I need to deploy my web service. It needs to run in a separate application pool in IIS with its own credentials.
Is it possible to do this by using a Web Setup Project in VS 2008?
By default, I seem to only be able to choose an existing application pool.
I’ve been down this road before and unfortunately you’ll need to create the application pool manually or write a Custom Action to manage this for you.
Further to Grzenio’s question in the comments below:
‘Could you give me a hint where to start looking for the code/helper classes? And do you keep your project a Web Setup Project, or just use the standard application setup project?’
I added a new project called
InstallHelperto the solution containing the setup project. In that project I created a class calledInstallActionswhich derives from:System.Configuration.Install.Installer(MSDN).There are four methods you can override on the
Installerbase class to allow you to specify custom actions depending on whether you’re in the Install, Commit, Uninstall or Rollback phases when the installer is running.I also added a number of text box dialogues to the setup project user interface. Input and state captured from these dialogues is passed to your custom install action via a dictionary. i.e.:
To add your custom action project to the setup project, open the Custom Actions viewer/editor and specify the output from the
InstallHelperproject.That’s the basics and should get you started. The Web Setup Project also supports custom actions and additional user input dialogue boxes, so you may wish to re-use your existing project, in addition to a custom action.