Here's what I want to do:
My web application is very slow at first until all pages have been precompiled and the cache has been populated. I want to 'warm up' the application in Global.asax by triggering a few HTTP requests to the slowest pages.
The problem is that I don't know which port the application is running on. Could be 80 (my local IIS or the deployed server, 8080 on our test server or some random port for some colleagues who use the ASP.NET development server)
I thought it would be fairly simple to read the merged web configuration, extract the binding, create a url and trigger the request with HttpWebRequest.
However, I had no luck whatsoever... (I mainly tried WebConfigurationManager)
Any ideas?