0

I am using azure traffic manager which redirects the url to the relevant server based on traffic. I want to know where it is been redirected or which subdomian e.g i am hitting https://example.com and traffic manager redirects it to example.cloudapp.net. In c# code want to get the subdomain or the redirected url is it possible.any help would be appreciated.

Mahesh
  • 8,694
  • 2
  • 32
  • 53
Shantanu
  • 554
  • 2
  • 9

1 Answers1

0

You can specify a cloud Configuration key 'envNAME' = "MyCloudApp1" for first deployment and "MyCloudApp2" for second cloud service deployment. Then you can directly read that config value and as they differ in each of the environments, you can easily identify that where you request has reached by reading that config value.

There could be other easy solutions as well like looking into your request host headers, but I need to try that.

But the above config based solution should work perfectly.

Mahesh Jasti
  • 572
  • 3
  • 18