Connection String Password

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/31/2012 8:54:09 AM
Gravatar
Total Posts 88

Connection String Password

Hi,

Is there a way to set the connection string Password encrypted with some key like machine Key or other key?

This is very useful because  we need to several time some other external people from company makes change to web.config and they can´t see our password.

Thanks

5/31/2012 9:12:48 AM
Gravatar
Total Posts 18439

Re: Connection String Password

It is possible to encrypt specific sections of Web.config file including the <appSettings section which has the db connection string. However to do that you cannot use user.config file, so you have to maintain all the settings directly in Web.config and remove the attribute for user.config from the <appSettings file="user.config"> element

You'll need to google for information about methods to do the encryption of web.config sections, this thread on stackoverflow is a good start.

Make sure you backup your Web.config and user.config on your local machine in case anything goes wrong.

Hope that helps,

Joe

5/31/2012 9:36:21 AM
Gravatar
Total Posts 88

Re: Connection String Password

Hi,

Thanks for the answser.

Its possible set the connection string only on <ConnectionString> secction on web.config?

I fount this command "aspnet_regiis -pef Secction" that encrypts all secction of web.config and if i put the connectionstring key on <connectionString> section i´ve sould my problem...

But in my case im using "MSSQLConnectionString" from appSettings and this command encrypts all section and i only need to encrypt the connection String key...

How can i put MSSQLConnectionString on <connectionString> Secction?

thanks

5/31/2012 9:42:22 AM
Gravatar
Total Posts 18439

Re: Connection String Password

Sorry but mojoPortal does not get the connection string from the <connectionStrings section, it uses <appSettings

If you wan to encrypt it you will need to encrypt the <appSettings section as I said before.

5/31/2012 9:43:04 AM
Gravatar
Total Posts 88

Re: Connection String Password

OK,

Thanks...

You must sign in to post in the forums. This thread is closed to new posts.