I'd like to install the IIS Application Initialization plugin on my WebRoles. I attempted to install the MSI in a startup task, using msiexec. The roles are never initializing. I'm guessing this is because the MSI requires a VM reboot to finish installation.
Is there are a way to do this? I'm a little hesitant to use the Web Platform Installer, because I don't want the extra dependency.
Running MSIs shouldn't be a problem, including ones that require a reboot, assuming that after the reboot, they don't try to reboot again. (Most installers detect they're already installed the second time around and just return.)
Have you tried remoting into a VM and running the MSI manually? Often there will be a helpful error message. I assume the startup task is running elevated?
One random guess: is your app using osVersion="2"? osVersion="1" will give you IIS 7, I believe, and I think you need IIS 7.5.
I tried running it manually from the command line with the same command I'm using in the startup script. That worked fine. It did reboot the machine, and after the reboot it didn't try to reboot again.
My roles are set to osFamily="2" osVersion="*". The startup task is set to run as Elevated and Simple.
Unfortunately I can't get much more information than that. When I run the MSI from the startup script the instances never get past initializing, so I can't RDP into them or get any logging about problems. I'm starting to think I should just wait for IE8 to be released. :)
Set the task type to background so you can remote in while it's running / afterwards. Then set the msiexec line to log. (Take a look at the /l param, IIRC.) Now you should be able to deploy and then remote in and look at the log. Hopefully that will tell you what's going on. Also check my blog post: http://blog.smarx.com/posts/windows-azure-startup-tasks-tips-tricks-and-gotchas.
Tried the "Background" trick, and it still won't start up enough to let me RDP into it. Which I guess is pretty interesting in itself.
I was already writing to the log, but it doesn't help much because I can't get in to see the log.
I also tried specifying to use the msiexec.exe in System32. That didn't help either.
Hi Brian, I know this thread is three months old but did you ever get the Application Initialization module to work with Azure web role? We are thinking of using to preload our existing ASP.Net 3.5 web app but want to make sure that it will also work on azure on top of on prem installs. Thanks.
Nope, I eventually gave up. I'm not sure if that's because it just won't work, or because I messed up something in a configuration.
I would imagine that getting it to run in IIS 7.5 would be considerably easier. I would guess that IIS 7.5 will be available on Azure in the not-too-distant future. So if you can run IIS 7.5 on-premise and wait for it to be standard on Azure, that might work well.
IIS 7.5 has been available in Windows Azure since November of 2010: http://blogs.msdn.com/b/windowsazure/archive/2010/11/29/just-released-windows-azure-sdk-1-3-and-the-new-windows-azure-management-portal.aspx.
In fact, I mentioned how to get IIS 7.5 earlier in this thread. :-) Just set osVersion="2" in your .csdef.
- Edited by Steve Marx Thursday, August 30, 2012 7:09 PM linkifying the link
You expect me to actually read these forum threads? :-)
That's what I get for dashing off a quick response (which I'm doing again right now). What I meant was IIS 8, since initialization is built-in there.
- Edited by Brian Reischl Thursday, August 30, 2012 7:44 PM
I found this thread during resolving exactly the same problem. And looks like I found the solution. My startup script:
@echo off SET MSIPath=%~dp0 %MSIPath%appwarmup_x64.msi /qn /norestart exit /b 0
Here are 2 key points:
- /norestart key. I believe that it is a root of all problems
- But if it is not enough. You get 3010 error (reboot required). To suppress it just return 0 error code (last line)