i'm using this code
string DomainName = HttpContext.Current.Request.Url.Host;
my url is http://localhost:55589/ but it is return only localhost
now i'm want to get http://localhost:55589/ how to possible
Home / DeveloperSection / Forums / How to get Domain name
string DomainName = HttpContext.Current.Request.Url.Host;
my url is http://localhost:55589/ but it is return only localhost
now i'm want to get http://localhost:55589/ how to possible
Anonymous User
04-Oct-2014string DomainName = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority);
this will return you http://localhost:55589