Note that there are some explanatory texts on larger screens.

plurals
  1. POAzure failing to find Certificates on Windows Server 2012 Worker Role
    text
    copied!<p>I am currently trying to upgrade our Azure Cloud Service (Web and Worker roles) to .Net 4.5 Framework. For this, we must change our Azure deployment from Windows Server 2008 to Windows Server 2012.</p> <p>This requires us to change the OSFamily from "1" to "3" in our ServiceConfiguration file.</p> <p>Current System</p> <ul> <li>.Net 4.0 </li> <li>MVC3</li> <li>EF 4.4</li> <li>Azure Tools 1.6</li> <li>Visual Studio 2010</li> <li>Windows Server 2008</li> </ul> <p>Upgraded System </p> <ul> <li>.Net 4.5</li> <li>MVC4</li> <li>EF 5</li> <li>Azure Tools 1.8</li> <li>Visual Studio 2012</li> <li>Windows Server 2012</li> </ul> <p>I am running into a problem when we query the Azure Certificates to figure out if we are on "Production" or "Staging" environment.</p> <p>The following lines of code find the certificates. Shortened for clarity.</p> <pre><code>// Open the certificate store for the current user. X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser); certStore.Open(OpenFlags.ReadOnly); foreach (var cert in certStore.Certificates) { OutputToFile.OutputDataReceived("Cert - " + cert.FriendlyName + " -- Thumb -- " + cert.Thumbprint); } // Find the certificate with the specified thumbprint. X509Certificate2Collection certCollection = certStore.Certificates.Find( X509FindType.FindByThumbprint, thumbPrint, false); // Close the certificate store. certStore.Close(); </code></pre> <p>As you can see, I am printing the cert details to a log file to see where if breaks down. On OSFamily="1" (Windows Server 2008) this work perfectly. It finds the certificates.</p> <p>However when I set OSFamily="3" (Windows Server 2012) the log file does not print the certificate details from the loop.</p> <p>It also works fine locally. </p> <p>Is this an issue with Windows Server 2012 or some issue with Azure deployments? Must I do an extra step with my certificates since moving to Windows Server 2012?</p> <p>Any direction would be greatly appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload