Azure role configuration management Azure role configuration management azure azure

Azure role configuration management


Passing a Stream to ComputeHash() ends up with a different hash as compared to using the byte[] overload. I don't know why.

Try something like:

private static void ComputeHash(HashAlgorithm hashAlgorithm, Stream stream){    BinaryReader reader = new BinaryReader(stream)    byte[] hash = hashAlgorithm.ComputeHash( reader.ReadBytes( (int)stream.length ) );    string hashString = BitConverter.ToString(hash);    Console.WriteLine(hashString.Replace("-", string.Empty));    Console.WriteLine();}

This will give you the hash you're after.

As you've probably already discovered, on linux you can get the digest with

openssl dgst -sha256 /path/to/file


I you have items in your web.config that you want to change depending on how it's being built, there is a solution that is outside of Azure that you can use. You can use Web.config transforms. These transforms are tied to your build configuration not your service configuration, but your service configurations a likely closely tied to your build configurations anyway (...Local.csfg -> Debug, ...Cloud.csfg -> Release). If the default build configurations don't work for you, just create the ones you need.

If you want to use different service definitions per service configuration, then it's not supported by the UI, but you can mess around with the build process to make it work