How to get DNS name from REST service that is consumed using startuptask Azure webrole

I have confirmed that it is not possible to get the DNS name and environment information (intermediate version) without a certificate and management API.

However, consider my case in which my startuptask (exe) uses a REST service to publish some data, so in this REST service, can I do some trick to get the DNS name?

I tried with the following

HttpContext.Current.Request.UserHostName , however this is the same as HttpContext.Current.Request.UserHostAddress

Please give me a suggestion if anyone did this trick for you.

Update

Using HostName and HostAddress I can get the IP address of this webrole (confirmed with a browser request), but when I try this with the nslookup command, it tells me that the domain does not exist

Does Azure support reverse lookups?

Thanks at Advance.

+1
source share
1 answer

After I study the above details, I would say that using the above trick, you get an external VIP address about your service.

Let's consider that in this case it will be something as shown below, and if you have port 80 configured with your application, you can use this IP address in any browser to make sure, and you are done:

65.52.14.112

nslook IP-, , :

C:\myTools>nslookup 65.52.14.112
Server:  router.belkin
Address:  192.168.2.1

*** router.belkin can't find 65.52.14.112: Non-existent domain

, ( , ), nslookup :

C:\myTools>nslookup azurevmassistant.cloudapp.net
Server:  router.belkin
Address:  192.168.2.1

Non-authoritative answer:
Name:    azurevmassistant.cloudapp.net
Address:  65.52.14.112

, IP- . , loadaseancer Windows Azure, .

, Windows Azure " ", , , , : http://www.mygreatwindowsazureidea.com/pages/34192-windows-azure-feature-voting

+1

All Articles