In asp.net, I want to get just the domain information?
i.e localhost or example.com
possible?
can this value ever be null or its 100% gauranteed to return a value?
HttpContext.Current.Request.Url.Authority
. Or replace .Authority
with something more appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With