1

I have the following configuration in my Azure web role deployment :

<WebRole name="FrontOffice" vmsize="Small">
  <Sites>
    <Site name="Web">
      <VirtualApplication name="mag_admin" physicalDirectory="../../Sites/BackOffice" />
      <Bindings>
        <Binding name="EndpointFrontOffice" endpointName="EndpointFrontOffice" />
      </Bindings>
    </Site>
  </Sites>
  <Endpoints>
    <InputEndpoint name="EndpointFrontOffice" protocol="http" port="80" />
  </Endpoints>

Which is, a FrontOffice MVC 3 web application and a BackOffice MVC 3 web application in a virtual directory (VirtualApplication).

I have upgraded to SDK 2.0 a couple of weeks ago, but stayed on StorageClient 1.7, since there are some breaking changes. Everything was OK for a while.

Last monday, all of sudden (and I checked and double-checked source control to be sure nobody changed the configuration), the BackOffice stopped working, because the "msshrtmi.dll" 1.7 file was missing. I think it used to be in the GAC (on my own machine it is) but was effectively missing on the Azure host (only 2.0 was present). I added the DLL in my web application references and it worked.

But now... that same web application complains it cannot connect to SQL Server because the connectionString is wrong. No wonder, it looks into web.config when it should look into the Azure ServiceConfiguration. We have a connectionString provider that checks if RoleEnvironment.IsAvailable returns true, in which case it will take the connectionString from ServiceConfiguration. And for the BackOffice, it now returns false. Everything works fine for the FrontOffice.

Does anyone knows if some changes have been made to Azure last week-end that could explain this sudden behavior?

  • 2
    Was your application redeployed? i.e. could it have been assigned a fresh VM rather than the VM it was already on? – Lukos Jun 25 '13 at 09:22
  • Yeah I supposed it has move to a fresh VM. I republished a dozen times, to no avail. Haven't tried to remove and recreate the node on Azure portal. I could even if I'll lose the IP address, but it's not production yet. – user1174017 Jun 25 '13 at 09:33
  • Just wondering because I saw recently a mail from Azure saying that they were ditching older versions of Windows Server and any new deployments would be on Server 2012 or something. It is therefore very possible that their newer builds are missing libraries that were needed on older versions. I have found the Azure updates a bit of a pain since there are many breaking changes but personally, I recently uninstalled and re-installed Azure SDK March 2013 (v2) and all seems fine. – Lukos Jun 25 '13 at 10:13
  • Can you not use `IsAvailable`? Can you use this for a while instead http://stackoverflow.com/a/6410124/57428 ? – sharptooth Jun 25 '13 at 10:51

1 Answers1

2

I finally understand what happened.

When I upgraded to Azure SDK 2.0, it updated only the Azure web role project, not the web applications projects, which were still referencing the SDK 1.7 DLLs.

But no one noticed and it worked for a while. Lukos is probably right : Microsoft made some changes to their VMs, and the GAC now only contains the DLLs for 2.0 (since my deployment is targeting 2.0).

I made the necessary changes to my web applications (switching the DLLs) and now everything is fine.