Last post Jul 15, 2009 02:39 PM by Tswiecki
Apr 03, 2009 10:39 AM|grsuggitt|LINK
Apr 08, 2009 05:15 AM|Thomas Sun – MSFT|LINK
From your description, when you try to uninstall web application, the virtual directory is not deleted from IIS website node list, right?
If so, you can refer to the same discussion on
http://forums.asp.net/t/1397807.aspx. You can delete it from Custom Action.
If you are using IIS 7.0 and .Net Framework 3.5, you can use Microsoft.Web.Administration which is a new a management API for the web server that enables editing configuration through complete manipulation of the XML configuration files.
For more information, see
I look forward to receiving your test results.
Apr 09, 2009 11:36 AM|grsuggitt|LINK
This is incredible!
(1) since WIndows Installer installed the Web Application (virtual directory), Windows Installer should uninstall it
(2) Microsoft is expecting me to manipulate a config file that they invented to support web services (instead of providing a simple API that perfoms the same function as manually removing the Web Application)
(3) the documentation for Microsoft.Web.Administration is typical Microsoft - technically correct but rarely useful.
(4) I assume I am to remove all instances and references to my Web Application from the applicationHost.config file. Including the section that is marked "The <customMetadata> section is used internally by the Admin Base Objects (ABO) Compatibility component.
Please do not modify its content.". Am I correct?
That being said, I still don't know how to do it.
For example, in the <customMetadata> section that are a number of <key>s that contain references to my virtual directory. So I figure I should open this section and remove my <key>s.
But the following code:
using (ServerManager mgr = new ServerManager())
Configuration appconfig = mgr.GetApplicationHostConfiguration();
ConfigurationSection section = appconfig.GetSection("system.applicationHost/customMetadata");
returns a section that has no ChildElements. So how do I enumerate the <key>s?
Sorry for the ranting, but I am astonished at what Microsoft expects me to do.
And I will appreciate any further assistance you can provide. Thanks.
Jul 15, 2009 02:39 PM|Tswiecki|LINK
I also find this really annoying. I've just discovered I will have to change 10 installers for my ASP.NET sites/web services beacuse Windows Installer is not smart enough to remove the virtual directory. Isn't there any simpler way to force the installer
to remove them other than custom actions?