Learn More





Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesConfigurationManager.AppSettingsConfigurationManager.AppSettings
New Post
9/24/2015 11:58 AM

Replacement for an application specific web.config when moving from a iis web user control to a dnn cutom module.


My user control uses an application specific web.config file to define  ConfigurationManager.AppSettings which are used by the user control to connect to a non dnn database web service.  I made the usercontrol a dnn module. In order to verify that the uploaded module does work on my development dnn server, I have temporarily hard coded the NetworkCredential username and password rather than accessing their values through ConfigurationManager.AppSettings["uname"] and ConfigurationManager.AppSettings["pwd"] in the view.ascx.cs file.

I need to define ConfigurationManager.AppSettings without modifying the dnn site web.config file.

I am not able to modify the production dnn web.config file nor can I expose the web service database username/password through code which may be viewed by an end user accessing the site.  Is this something that can be placed in the settings user control ?  Can one point me to an example ?

thank you for your help in this matter.



New Post
9/25/2015 1:28 PM
Hi Karen,

Why can't you modify the production web.config file? If you need to, I believe you can add the string to that file programmatically during the module install. That would seem to me to be the best way to do it as it follows the normal practice for credentials storage.

New Post
9/25/2015 1:38 PM
Thanks, Just wanted to make sure that I was not missing a different preferred approach. I have an exmple of including the web config changes in the manifest and I will look into creating that now.
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesConfigurationManager.AppSettingsConfigurationManager.AppSettings

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?