How to get full host name + port number in Application_Start of Global.aspx?
When your web application starts, there is no HTTP request being handled. You may want to handle define the Application_BeginRequest(Object Sender, EventArgs e) method in which the the Request context is available. Edit: Here is a code sample inspired by the Mike Volodarsky’s blog that Michael Shimmins linked to: void Application_BeginRequest(Object source, EventArgs e) { … Read more