I am moving an existing (and working) ASP.NET web site to Azure web site. One of the bits of functionality on the site is signing an XML document. The code to get the key is:
// retrieve a key from the key safe - this will create it if it does not exist yet
System.Security.Cryptography.CspParameters csp = new CspParameters();
csp.KeyContainerName = "MyKeyName";
System.Security.Cryptography.RSACryptoServiceProvider key = new RSACryptoServiceProvider(csp);
The last line is throwing a CryptographicException, with the message "The system cannot find the file specified".
I have not put a key or container into Azure - my understanding is that the ServiceProvider would create one. I have reviewed this article, but did not get any clues.
Clearly I am missing something fundamental.