Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top