Yesterday, I could deploy my services perfectly fine to the hosted service instance on Windows Azure. Today, I’m always getting errors like
6:09:56 PM - Preparing...
6:09:56 PM - Connecting...
6:09:59 PM - Uploading...
6:11:15 PM - Creating...
6:12:28 PM - Starting...
6:13:20 PM - Initializing...
6:13:21 PM - Instance 0 of role TestWebRole is initializing
6:18:39 PM - Instance 0 of role TestWebRole is busy
6:21:51 PM - Instance 0 of role TestWebRole is stopped
6:21:51 PM - Warning: All role instances have stopped
6:22:23 PM - Instance 0 of role TestWebRole is busy
6:23:26 PM - Instance 0 of role TestWebRole is stopped
6:23:26 PM - Warning: All role instances have stopped
These errors occur usually because of dependencies which are not present on the cloud server (that’s what you find on SO and Google if you search for the warning above). But I checked each and every dependency, and they are there with Copy Local=True.
To further isolate the problem, I first created a fresh Azure project with a new MVC 3 Web Role, then I created a new Azure project with a standard ASP.NET Web Role, and still no luck. I tried to deactivate Diagnostics, re-active it. On the Azure emulator, the projects run fine.
Even the standard Visual Studio cannot be deployed to Azure, I’m always getting the Warning: All role instances have stopped.
Kind of frustrating. I’m on the latest Azure SDK 1.7 with Azure tools 1.3.
Thank you for any hints.
If the projects run fine in the emulator, most of the time this is because you have all the required dependencies installed on your machine but not in Windows Azure.
I suggest you take a look at the blogpost in David’s answer, besides explaining how to disable the session state it also explains which assemblies you must set to Copy Local to get MVC3 working correctly. Alternatively you could try one of the techniques described by Steve in his blogpost: http://blog.smarx.com/posts/asp-net-mvc-in-windows-azure
It can really help you to activate Remote Desktop to solve this issue. If you notice that your instances are cycling I suggest you connect through RDP and look at the event viewer (you might need to try a few times before you can connect). Keep an eye out for ASP.NET warnings in the Application log, most of the time those will give you more information on which assemblies you’re missing.