Generate encrypted password for Web.config file...

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
3/22/2011 1:54:15 PM
Gravatar
Total Posts 165

Generate encrypted password for Web.config file...

Ok, I have looked and looked and just have not found the correct way or I should say an easy way to do this.  I would like to encrypted my passwords that are in the web.config because I just really do not like them out there in plan text.

So, can someone tell me of a app or something to do this?

I have changed the Machine Key, but I do not know if that can be used to encrypt passwords in the web.config.

Thanks,

Mark

3/27/2011 8:44:38 AM
Gravatar
Total Posts 18439

Re: Generate encrypted password for Web.config file...

Hi Mark,

It can be done, but it would require you to not use the user.config file and instead keep all of the settings maintained directly inside your web.config file.

You can encrypt any sections of Web.config including the <appSettings section where the db connection string with user and password are stored.

This post on stackoverflow has relevant links.

Hope it helps,

Joe

4/15/2011 3:37:03 PM
Gravatar
Total Posts 63

Re: Generate encrypted password for Web.config file...

Hi Joe,

If I encrypt the web.config file, does mojoPortal automatically decrypt it wehn needed? In another word, do I need to change mojoPortal after the encryption of web.config?

Thanks,

4/16/2011 6:21:05 AM
Gravatar
Total Posts 18439

Re: Generate encrypted password for Web.config file...

Its a feature of ASP.NET not mojoPortal, ASP.NET will decrypt it automatically the first time the Web.config file is processed, this is before it gets to mojoPortal code. ASP.NET tools do the encrypting based on a machine specific key so you can't encrypt it on one machine and deploy it to another. Follow the links in the stackoverflow post for more details.

Best,

Joe

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