Reputation: 15430
In my host file I have provided this option 127.0.0.1 localhost mysite.com so that I can access my localhost site with my custom name (I can access the site directly via typing http://mysite.com/ in browser). Now issue comes how do I do the same with my VS2008. I want to debug my application with url in the browser like this http://mysite.com/ . I tried by putting the "http://mysite.com/ " in Use Local IIS web server option textbox of my webproject properties build option but I can't run my project with that. Is this compulsory that I have to enter localhost url only in that textbox. Can you help me in fixing the above issue?
Upvotes: 0
Views: 872
Reputation: 7013
You have to actually have a site set up in IIS with host name pointed to your site's url: mysite.com. Then go to project options, Web tab and select Use locakl IIS Web server, specifying Project URL as http://mysite.com
Upvotes: 1
Reputation: 505
Edit the file HOSTS on C:\windows\System32\drivers\etc.
Like this...
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 my.domain.com
Now, on your browser, call http://my.domain.com/APPLICATION
Hope it helps.
Upvotes: 1