Our server application runs as a service and has a ASP.NET MVC3 web-based frontend that connects to our application for monitoring and configuration. Our application is generally installed on client servers that are maintained by their IT departments so I’m trying to figure out the best way to package and deploy the ASP.NET portion of our application to make it as painless as possible to run on their servers.
It seems like the official way to run an ASP.NET MVC3 site is to deploy it to an IIS server installation. Since we would like to avoid pushing the additional overhead of providing, installing, and maintaining a full web server onto our clients it seems that it would be best if we could give them a package that was entirely self-contained and just ran a second service alongside our application. The web frontend is for internal use only so scaling isn’t much of a concern.
Any ideas?
Since there weren’t a lot of responses here I’m answering with what I ended up doing in case anyone runs across this in the future.
We ended up using IIS Express. We’re going to distribute the IIS Express installer along with our installer (allowed by the IIS Express license: http://blogs.iis.net/vaidyg/archive/2011/01/17/iis-7-5-express-official-release-highlights.aspx). Once installed we use CreateProcess to directly run iisexpress.exe with the /path set to our ASP.NET project so the entire thing is completely controlled by our existing service (and we can route output into our logging system). We use Job Objects to ensure that the IIS Express process is killed if our service crashes.
We do something like this to shutdown IIS Express:
We haven’t put this into production yet, but it’s been working great so far during development.