I have an ASP.net web application that has different functionality and data depending on the URL that it is logged in as.
Everything works fine in a deployed environment as I can bind several hosts in IIS and the web application can then interrogate the request.URL to work out which code and data to use.
eg. http://foo.bar.com will run different code than http://test.bar.com
The problem arises in debugging in VS2010 on my development machine. I can hard code a default site url in the configuration but require several to be run at the same time. e.g site1.localhost, site2.localhost, site3.localhost ....
I have tried editing my hosts file in system32/drivers/etc e.g
127.0.0.1 localhost site1.localhost site2.localhost
but if I hit site1.localhost in my code the request.Url is always localhost
Is there anyway I can get around this?