Friday, April 20, 2012

Azure Web Role stuck initializing

I have an MVC web role I am trying to deploy to Azure. It keeps bouncing from Starting > Initializing. I have done my research, and found two main causes for this.




  1. One of the assemblies I am using does not have Copy Local = True set

  2. The diagnostics connection string is wrong.



I Have triple checked my diagnostics connection and it is fine. I can use the exact same connection string in a Worker Role and it starts just fine So I assume the problem is related to #1 above.



This was a standard MVC project I added an azure deployment project to, so my guess is I am missing something an "Azure web role project" would automatically do for me. I already selected the "Add deployable assemblies" option from the projects context menu so the MVC bits should be set up, right?



Here is a list of my references, the items highlighted have Copy Local = true. Am I missing one? What else do I need to do to get this to deploy? Are there any diagnostics tools I can use to help me figure it out?



update:

I love when I find more information :)



So I was finally able to catch it in a state when I can remote into the server. I opened IIS and saw everything was there that should be. I tried to hit the site locally, but I get this error.




Could not load file or assembly 'System.Web.WebPages' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)




So there is (at least one of) my error.....but why? The site runs fine in IIS express, and it runs fine in development fabric. I feel like a noob here. What did I do wrong?



enter image description here





No comments:

Post a Comment