вторник, 16 октября 2012 г.

How to set custom url instead of localhost

Assume that we're developing a web application using ASP.NET and IIS, we want to be able to go on site not by http://localhost/myfakesite domain, rather http://myfakesite.com
First of all open IIS, right click on the "Sites" on the left panel and create a new site. It's important to set the sorrect physical URL where site resides on a hard drive:

Next we can see that the bindings are already created
 
Don't forget to set right framework version of application pool


Finally go to C:\Windows\System32\drivers\etc and add into hosts file a line
127.0.0.1 www.myfakesite.com

Done!

Комментариев нет: