Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Modifying web.config during a Module installModifying web.config during a Module install
Previous
 
Next
New Post
11/11/2008 12:33 AM
 

I am preparing a module, which itself is using a Provider model to allow users to switch to a specific implementation.

I have seen DNN provider manifests with entries that allow web.config to be updated appropriately on provider install. Are these provider manifests executed (I mean that appropriate changes are made to web.config based on the manifest) automatically by DNN, or those providers contain custom code to make the changes??

If they are processed automatically by DNN, is this possible with Module manifests also?? i.e. can I provide instructions in Module manifest XML to add or modify elements to web.config when the module is installed or upgraded???

 
New Post
11/11/2008 5:21 AM
 

I think you can't do that from DNN manifest. CMIIW.

You should do from .NET code. Maybe from Page_Load or something.

CMIIW.

 
New Post
11/11/2008 9:23 AM
Accepted Answer 

This blog by Charles Nurse which gives information on the DNN XmlMerge capability should be just what you're looking for:

http://www.charlesnurse.com/post/Updating-config-files-using-XmlMerge.aspx


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/11/2008 11:46 AM
 

Thaha Consulting wrote

You should do from .NET code. Maybe from Page_Load or something.

A better place would have been to implement IUpgradable & perform config changes there. Config changes are one time changes, and doing them in Page_Load would recursively (and infinitely) lead to AppDomain recycling as each request to that page would again modify web.config, not to mention the preformance hit of parsing xml each time page is requested, even if you check for changes before performing them again.

 

This blog by Charles Nurse which gives information on the DNN XmlMerge capability should be just what you're looking for:

http://www.charlesnurse.com/post/Updating-config-files-using-XmlMerge.aspx

Thanx, that was what I was looking for. However, I would suggest DNN team to add an option that allows the change to be updated (if it exists) or added if it does not exist.So, does the "update" action actually checks for node existence, updating if it exists or adding it if NOT?? or it simply tries to update it??

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Modifying web.config during a Module installModifying web.config during a Module install


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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out