I see Microsoft have released Application Initialization as part of IIS 8.0. Unfortunately it isn't enabled in the Web Role by default. (by that I mean, "Application Initialization" as a feature of the web server role is not enabled. I know the Web Role has IIS 8.)
Does anyone know how I can enable this from a start-up script? I've already a number of start-up scripts, but I'm not sure how to add a server role feature.
The module itself appears inside Server Manager under "Server Roles" -> "Web Server (IIS)" -> "Web Server" -> "Application Development" -> "Application Initialization".
It's a shame that this isn't enabled by default as it will be very useful.
thanks
Kris
The web role absolutely has IIS 8.0 installed. Id you change the web role to OSVersion=3, it will deploy your app to a Windows Server 2012 image with IIS 8.0.
If you mean the VM (Azure IaaS)? What I would do is start from Windows Server 2012, remote desktop in, install the core server as you want, sysprep it, capture the image. This way you have it for re-use in your Azure Image Gallery. Then you can spin up many VMs from this base image with IIS 8.0 already set up/installed etc.
First you'll need to install the feature using a startup task:
And then you'll need to configure your site in IIS (startMode and preloadEnabled):
I wrote a blog post about this and you can find a sample application on GitHub.