In my Windows Azure web role I want to programmatically obtain (and log) current Guest OS version (such as WA-GUEST-OS-1.23_201305-01
). I know I can use Management API for that but that's a dependency on an external service and also isn't very fast.
How do I programmatically find the current Guest OS version from within my web role?
The Guest OS is a level above your application.
If this was a desktop app, you've need to use a management Library call, to call out of your application, to ask the operating system what it is.
you'll need to something similar from within your role, to call out to the management API.
If this is something to do often, you should just cache the result in your application once you retrieve it the first time and maybe update the cache once per hour/day depending on your needs.
http://msdn.microsoft.com/en-us/library/windowsazure/gg456325.aspx