Survey Forums

HomeHomeSurvey Project ...Survey Project ...DevelopmentDevelopmentAvoid hardcoding SQL password in web.configAvoid hardcoding SQL password in web.config
Previous
 
Next
New Post
12/22/2017 12:01 PM
 
Hi,

Is there a way I can avoid hardcoding my SQL account password in the web.config? 

If not, does anyone know where in the source code the web.config is looked at for database connections? Because it looks like I might need to change the source code to support password decryption.

(also, I assume it's allowed for me to change the source code right? It's GPL 3.0 afterall)

Thanks for the help!

EDIT: 

One more question! Is it possible to get my survey application to connect to the database using Windows Authentication? So instead of putting a SQL account and password in the web.config, I can just say use windows authentication?

Thanks!
 
New Post
12/23/2017 3:18 PM
 
Hello Chris,

To hopefully answer some or part of your questions:

- are you aware of the encryption/ decryption option in SP 2.4? menu Surveys/Settings/System Settings - see SP helpfiles also - just do a Submit to encrypt the connectionstrings (decrypt option will be available once encrypted).

- you should be able to use the Windows Auth. account option in you connectionstring depending how your sqlserver instance is configured.  Additional info: https://msdn.microsoft.com/en-us/library/ff647396.aspx 

- making changes to the (open) source code of SP is allowed as long as you're following the licening rules. Simplified short version: "share and publize your changes/ changes code if it's not used just for yourself". You can always publish and share the code by creating a fork in Github and commit your changes to your forked version.
 
 
Previous
 
Next
HomeHomeSurvey Project ...Survey Project ...DevelopmentDevelopmentAvoid hardcoding SQL password in web.configAvoid hardcoding SQL password in web.config