Alright, before you go crazy on me they are not really hidden, I mean there is an internet page where you can find those values but still…. you gotta find that page ;). A few days ago we received an email from a client that said that they were in their final testing in production of the application before they roll it out, but they found something strange, ALL of the hyperlinks that were generated server-side were with the IP address and not the domain ?!?!? We asked them to check with the staging app if they had the same problem (we had already checked, but wanted to make sure). When to got back to us we got the ALL GOOD for staging …. again !?!?! We were the hosting the staging but not the production, that was the only difference and they we’re doing business with another company for the hosting, as much info as we tried to get we kept hitting a wall of dunno’s from them. So we assumed that maybe it had something to do with how the IIS and host headers configuration (shot in the dark!). So after googling I fell on that page where you can find a bunch of “hidden default values “ for ASP.NET that can be overriden and one of the is
<add key="aspnet:UseHostHeaderForRequestUrl" value="false" />
and when looking at the definition we get this little piece of info:
Specifies how the Url property is dynamically built. By default, the Url property is dynamically built from the host, port, and path provided by the web server.
Maybe this could be it (again shot in the dark, since we are working blind in this case). So we send this bit of info to our customer, telling him to add this to the application web.config in the appsettings and to make sure that the value is TRUE.
Since then we haven’t heard from him (3 days and going), so we’re guessing that was the right call.
Right or wrong call this page is now bookmarked for future references, I agree I may never have to go back to change those values, but at least I’ll know they exists, and I’ll have a reference to them. Just to make it obvious that’s the one => http://msdn.microsoft.com/en-us/library/hh975440.aspx