Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

IIS6 VDIR / Application Pool Removal

 
   Web Hosting and Web Master Forums (Home) -> IIS RSS
Next:  Using a custom error 500 influences global.asa be..  
Author Message
Jeff

External


Since: Feb 17, 2005
Posts: 1



(Msg. 1) Posted: Thu Feb 17, 2005 4:09 am
Post subject: IIS6 VDIR / Application Pool Removal
Archived from groups: microsoft>public>inetserver>iis (more info?)

I have a .NET setup / installation project that creates a .NET web site
(Virtual dir) on II6. In the Installer class which gets called from the
Custom Actions, I override the Install method to create an Application Pool
that will be specifically used for the Web site. We decided we wanted to have
seperate Application Pools dedicated to indiviual Web Applications rather
than having the the 'Default Application' pool controling all the sites.

The setup part works fine. The Vdir gets created, the Web App is installed,
the App Pool gets created, and Virtual Directory gets assigned to the newly
created App Pool. The problem I'm having is in the removal of the Web Site
when the "Add and Remove" program runs when UnInstalling the Web App.

In the setup project, I've set the "RemovePreviousVersions" property to
True. I've over ridden the UnInstall method in the Installer class, and set a
custom action for the UnInstall property. The problem I'm having is that when
the Web Site gets removed via the "Add And Remove" program, the Virtual
Directory gets removed, but the Application Pool that was assigned to the
Virtual Directory does NOT get removed.

The OS that hosts the IIS is Windows 2003 Server. I've tried to
programatically to remove the app pool in the UnInstall method of the
Installer class, but the code throws an exception saying it can't do that.
Doing some research, I came across something that said Service Pack 1 is
needed to programatically remove Virtual Dirs and App Pools.

But honestly, I figured I shouldn't have to do anything programatically do
remove the Virtual Dir and the App Pool. I Figured the .NET
Setup/Installation package should handle everything.

Any thoughts would be appreciated. Thanks in advance.

 >> Stay informed about: IIS6 VDIR / Application Pool Removal 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 2) Posted: Thu Feb 17, 2005 11:59 pm
Post subject: Re: IIS6 VDIR / Application Pool Removal [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Since you added custom code and logic to create the AppPool, you need to add
code to remove the AppPool on uninstall. Application, website, and
Application Pool are all distinct and unrelated entities (other than as
defined for your specific application), so obviously, you need to do the
work to associate them and delete them yourself -- in other words, deleting
a vdir doesn't mean its application pool gets deleted. The application pool
could have been used by some other application (from IIS perspective). IIS
is not MSI, so it does not follow component rules (nor does it make sense),
but your application setup program does need to follow component rules, so
you need to do the right thing.

Otherwise, you need to use a tool like WiX to create the MSI, and it has
CustomAction code that you can declaritively use (without writing code) to
install website, application, and application pool, and its code will do the
right things on install/uninstall without you needing to code anything.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Jeff" <nowhere.RemoveThis@nowhere.com> wrote in message
news:0A450993-F349-42C7-A6A1-6B24A256B114@microsoft.com...
I have a .NET setup / installation project that creates a .NET web site
(Virtual dir) on II6. In the Installer class which gets called from the
Custom Actions, I override the Install method to create an Application Pool
that will be specifically used for the Web site. We decided we wanted to
have
seperate Application Pools dedicated to indiviual Web Applications rather
than having the the 'Default Application' pool controling all the sites.

The setup part works fine. The Vdir gets created, the Web App is installed,
the App Pool gets created, and Virtual Directory gets assigned to the newly
created App Pool. The problem I'm having is in the removal of the Web Site
when the "Add and Remove" program runs when UnInstalling the Web App.

In the setup project, I've set the "RemovePreviousVersions" property to
True. I've over ridden the UnInstall method in the Installer class, and set
a
custom action for the UnInstall property. The problem I'm having is that
when
the Web Site gets removed via the "Add And Remove" program, the Virtual
Directory gets removed, but the Application Pool that was assigned to the
Virtual Directory does NOT get removed.

The OS that hosts the IIS is Windows 2003 Server. I've tried to
programatically to remove the app pool in the UnInstall method of the
Installer class, but the code throws an exception saying it can't do that.
Doing some research, I came across something that said Service Pack 1 is
needed to programatically remove Virtual Dirs and App Pools.

But honestly, I figured I shouldn't have to do anything programatically do
remove the Virtual Dir and the App Pool. I Figured the .NET
Setup/Installation package should handle everything.

Any thoughts would be appreciated. Thanks in advance.

 >> Stay informed about: IIS6 VDIR / Application Pool Removal 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
IIS5 VDiv verses IIS6 VDir - I have a little issue with virtual directories. 1: Create vdir called (lets say myvdir1) in IIS5.0 http://mysite.com/myvdir1. This maps to C:\websitecontent\mysite.com\myvdir1 folder on disk 2: Create vdir called (myvdir2) in iis5.0..

IIS6 Hangs on ASP after Terminal Services Removal - Our Windows Server 2003 was working fine until we uninstalled Terminal Services and activated Remote Desktop this morning. After we did this, we have been encountering hanging (cpu usage appears to be 0 or near 0%) on our web pages that are running ASP....

/LM/W3SVC/1/Root/vdir/global.asa - We recently install IIS 6.0 on Window 2003 Server. The asp pages that works on IIS 5.0 (Win NT) doesn't work for client until one of the administrators click on the pages and subsequently works for client. We went thru microsoft troubleshooting sit...

Cannot browse root of vdir located on another server - I've seen posts about this problem before but no solutions - does anyone have a clue about this? Win2K server running IIS5. Website with no unusual configuration, but has a virtual directory mapped to a share on another (Win2K) server. Correct login..

app pool failure iis6 - Hi, This is a problem with a server that is hosting sharepoint, I've had this posted there for a while, so I'd see if anyone could pick up on the issue here.. ----------- I am having some really strange behaviour with wss on win2003 standard which can....
   Web Hosting and Web Master Forums (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]