NotMyself
NotMyself

Reputation: 30047

How do I get my Wix installer to use an existing application pool in IIS6?

I am building a simple installer for a web application using Wix. I wish to use an existing app pool. The following code works as I want when installing the application.

<iis:WebAppPool Id='MyAppPool' Name='CRMAppPool'  />

This will set up the virtual directory using the existing CRMAppPool.

The problem is when, I uninstall the application, it deletes the app pool.

How can I prevent this?

Upvotes: 3

Views: 1523

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

First I'd like to ask why you want to do this. I've always been really paranoid about sharing app pools once I first learned years ago that a .NET 1.1 webapp could JIT and then a .NET 2.0 webapp would fail.

Assumming you've considered all of this and really do want to share the app pool, I wouldn't do it with a permanent component and described above. I would instead do it with a shared component. Since App Pool's can't really be keyfiles I would create a fake registry key that services as the keyfile and put the app pool in as a companion resource.

I would then duplicate this component across all of my installs so that MSI can reference count the component and when the last install comes off the machine it will remove the app pool.

Upvotes: 1

fletcher
fletcher

Reputation: 13760

Put the WebAppPool element in it's own component and mark the component as permanent. The permananent attribute will ensure that the component is not removed upon uninstallation.

Upvotes: 4

Related Questions