Reputation:
How remove "localhost:portno" when running an asp.net website under iis?... When i browse my virtual directory i can http://localhost:120/mine/Forms/Clients.aspx
.....
Upvotes: 0
Views: 3513
Reputation: 287
If your using IIS 7+ you can create a website (or edit its bindings). In the bindings, add your url that you would like specified. I usually follow {projectName}.{machineName}.{CompanyDomainName}.com.
Then open up notepad, notepad++, ect as admin and open up the host file (C:\Windows\System32\drivers\etc\hosts) and add the following:
127.0.0.1 {url you specified for the binding}
Restart IIS and when you navigate to the binding url, it should open the site.
Example:
Machine Name: Colorado
Domain Name: stackoverflow
Project Name: userDashboard
Binding: UserDashboard.Colorado.StackOverflow.com
Host File:
127.0.0.1 UserDashboard.Colorado.StackOverflow.com
Hope this helps
Upvotes: 1
Reputation: 2113
You have to specify port explicitly only when running non-default websites on IIS. Deploy you app to default website (or to virtual directory in it). Default website configured to 80 port so you can just type in browser "http://localhost/{virtual_directory}"
Upvotes: 0
Reputation: 6122
Configure your virtual directory in Default website in IIS where port = 80 OR set website port = 80. For port 80 you need not to define port in URL.
To set port, Go to website properties > In website tab > See TCP Port
Upvotes: 0