I would like to simulate that my ASP.NET application is hist by say simdomain.com.
How can i do that easily?
Ideally I would like some kind of filter, so requests to certain domains are routed to localhost, and it should be easy to turn it on and off.
Edit the hosts file.
Add the following line:
Open IIS admin and add a “simdomain.com” website. So it knows the domain.
Try editing you local hosts file. The default location is %SystemRoot%\system32\drivers\etc\hosts in most Windows systems.
Then you simply add the line
That should do it.
EDIT: Ah, and as Chakrit said: Open IIS admin and add a “simdomain.com” website. So it knows the domain.
This depends a bit on IIS version, but if I remember correctrly for IIS7 do as follows:
- Run ‘inetmgr’, or access the IIS setings via the Control Panel.
- In the menu on the left open ‘Sites’, and right-click on the site you want to access. Choose ‘Edit bindings..’
- Click add. Type: Http, IP Address: All Unassigned, Port: 80, Host name: simdomain.com then click OK.
Might as well make my answer correct, even if the post is a tad redundant. 😉
Maybe have a read of this SO discussion; “ASP.NET Development server or localhost IIS”