Link to home
Start Free TrialLog in
Avatar of CipherIS
CipherISFlag for United States of America

asked on

C# HttpContext.Current.Request.Url.AbsoluteUri.ToString()

I am using the following code to determine the web url so I can generate an e-mail to the user.

HttpContext.Current.Request.Url.AbsoluteUri.ToString()

The problem is that its suppose to return something like:

https://www.microsoft.com/mywebiste/default.aspx

but it is returning instead (via e-mail)

https://myservername/mywebsite/default.aspx

Any idea why and how to resolve?
Avatar of vinhnl
vinhnl

Could you show me the url on the address bar of your browser ? Which IIS did you deploy your website on ?
Avatar of CipherIS

ASKER

Can't show you the url on the address bar.  IIS6
SOLUTION
Avatar of ambience
ambience
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial