• 0

[Azure/C#] Accessing Instance information from a website.


Question

Hey!

I've been playing with websites in azure, and I want to get some information about the current site from azure, So I am trying to use the "RoleEnvironment" class from Microsoft.WindowsAzure.ServiceRuntime.dll to get the information.

However when I try RoleEnvironment.IsAvailable, I always get False, even though the website is running on azure? Am I missing something basic here?

Cheers!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I've read that, Can't see any where where i would have gone wrong.

The only part which sounds similar is

Windows Azure 1.3 and later reserves for its own use any environment variables that begin with the letters "RD", for example "RdRoleID". If your application creates environment variables that begin with "RD", in certain circumstances, the IsAvailable property will return false, and other methods and properties of theRoleEnvironment class will result in the error message "role discovery data is unavailable." To correct this, use environment variables that do not begin with the letters "RD".

but I havnt got any custom environment variables defined which could start with RD

Link to comment
Share on other sites

This topic is now closed to further replies.