Azure is giving me a headache.
I started off with a tutorial. Created a new MVC 3 project published it. Took about 9 mins then it was working fine on my production VM.
Then I tried to publish a project I've been working on (MVC 3). It has the following dependencies:
Service.dll
Domain.dll
Autofac.dll
It works fine when I debug using the emulator.
It works fine when I unzip the package and deploy it to another server.
But when I publish to Azure Production I get the following:
1:42:31 PM - Preparing deployment for Website with Subscription ID: ...
1:42:31 PM - Connecting...
1:42:35 PM - Verifying storage account '...'...
1:42:38 PM - Uploading Package...
1:44:46 PM - Creating...
1:45:56 PM - Created Deployment ID: ....
1:45:56 PM - Starting...
1:46:34 PM - Initializing...
1:46:34 PM - Instance 0 of role Website is in an unknown state
1:46:34 PM - Instance 1 of role Website is in an unknown state
1:47:06 PM - Instance 0 of role Website is creating the virtual machine
1:47:06 PM - Instance 1 of role Website is creating the virtual machine
1:47:37 PM - Instance 0 of role Website is starting the virtual machine
1:47:37 PM - Instance 1 of role Website is starting the virtual machine
1:50:13 PM - Instance 0 of role Website is in an unknown state
1:50:13 PM - Instance 1 of role Website is in an unknown state
1:50:44 PM - Instance 0 of role Website is busy
1:50:44 PM - Instance 1 of role Website is busy
1:54:31 PM - Instance 1 of role Website is restarting
1:55:02 PM - Instance 1 of role Website is busy
1:56:40 PM - Instance 1 of role Website is cycling
1:57:43 PM - Instance 0 of role Website is cycling
I've tried number of times. With no success.
I forgot to mention that I have the facebook C# sdk DLLs
I've used trial and error to find that the Facebook.Web.Mvc dll is causing me issues. It has been included inside the bin folder but still no good.
The Azure environment doesn't have all the MVC 3 assemblies. You need to make sure you reference them all in your project and set CopyLocal = true so that the assemblies get included in your Azure package. Azure will go through this infinite cycle if it can't find all the dependencies for your project.
The assemblies you need to reference are:
One blog I saw also mentioned needing WebMatrix.Data
, but I found I did not need this one in my project.
If you have any other assemblies you are referencing that are not part of the .NET Framework, you will also need set CopyLocal = true on those as well.
Also, make sure your Azure storage setting is NOT set to "Use development storage" when you deploy to Azure -- this will cause the same problem.
If the above doesn't solve the problem, check this site for some other possible causes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With