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.0How to remove httpHandler from web.config on module UninstallHow to remove httpHandler from web.config on module Uninstall
Previous
 
Next
New Post
12/11/2009 8:54 AM
 

Dear Colleagues!

Is is possible to remove httpHandler from web.config when client uninstalls the module?

We made a module. This module uses httpHandler. Handler installs on first call of the module (we just add it to the web.config). Module works fine and clients are happy.

But one client tried to uninstall the module and got portal died, because there is not .dll described in the web.config for httpHandler. We have put already big info for admin, so he should click special button before uninstall. But it is not good usabiliy. This is why we look for a way how to remove string with httpHandler from web.config on Uninstall or at least comment it.

Any solution for it?

Thanks.

Sergey

 
New Post
12/11/2009 10:45 AM
Accepted Answer 

Hi Sergey,

Assuming you're targeting DotNetNuke 4.6 or later, you can utilize the xmlMerge functionality of the uninstaller to accomplish what you're looking to do.  In a DotNetNuke 5.0 or later manifest, you'll want to add a node to the dotnetnuke/packages/package/components/component/config/uninstall/configuration/nodes element.  With correct path ("configuration/configSections/system.web/httpHandlers/add[type='your type']") and action ("remove"), you should be able to accomplish this task.  Your node will look something like:

                 <node path="configuration/configSections/system.web/httpHandlers/add[type='your type']" action="remove" />

I'm pretty sure this will work in a 4.6-4.9.5 installation, but I could be wrong here.  It will certainly work in 5.0 and beyond.  You can take a look at the manifest for my multi-factor authentication provider for a working demonstration.

Hope this helps!

Brandon

Edit: Charles Nurse also provides a good overview of this functionality in his blog entry from last year.  It includes an example of a web.config node removal in a 4.x manifest.


Brandon Haynes
BrandonHaynes.org
 
New Post
12/11/2009 2:23 PM
 

Brandon

Thank you very much for this Great help!

Yes, we work with new versions 4.x and 5.x and xmlMerge functionality looks like the best solution for this task. I am going to try it and make here small post about results. But think it will be ok. With each year DNN makes more and more good tools. I realy like it :)

Again thank you for your help!

Sergey

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to remove httpHandler from web.config on module UninstallHow to remove httpHandler from web.config on module Uninstall


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