encrypt database connection string

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/7/2010 5:14:54 PM
Gravatar
Total Posts 2

encrypt database connection string

I'm setting up mojoportal for my company's intranet site. (moving from an old administrators frontpage site) But I have an issue that must be resolved before I can implement the site. The issue is that according to our corporate security policy the databse connection string in the web.config file must be encrypted. I tried using the aspnet_regiis command, it encypted the string but the site doesn't work when the file is encrypted. If I decrypt the file the site works properly.

Please help, as I really like mojoportal but I need this issue to be resolved.

5/9/2010 10:17:10 AM
Gravatar
Total Posts 18439

Re: encrypt database connection string

Hi,

If you search google for encrypt web.config section, you will find lots of information about how to do it, including this article.

I don't think you can encrypt individual settings but must encrypt an entire section. In this case you would have to encrypt the appSettings section and you would have to remove the file attribute <appSettings file="user.config"> and keep all settings in the Web.config file instead of using an external user.config file. This will make it a little more work to manage upgrades because you always want to use the new version of Web.config and will have to re-apply your custom settings to the new version and re-encrypt it.

Hope it helps,

Joe

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