0

I Use Visual Studio 2010 with ASP.NET 4.0 and IIS7. When I open my site, the URL looks like this

http://localhost:6549/Website/help/tab/contact-us

I want a friendly URL:

http://mysite/help/tab/contact-us

or anything that will help me to get rid of the Port 6549 from URL

http://localhost/Website/help/tab/contact-us

I use ASP.NET Development Server which is what Visual Studio use when you run a localhost website


Wait !! Please make distinction between "Properties window" and "Property pages" of the project. I always tried your advices, but using "Property pages", and there is no such property like Use dynamic ports on that page. This property can be found only in the "Properties window"

1
  • Have you tried adding a new host header by modifying the website bindings in IIS? Commented Jul 15, 2010 at 15:00

3 Answers 3

1

Assuming it's the ASP.NET development server:

To get rid of the port number you need to do this - go to properties of the project - click the web tab - check the specific port and assign 80 There is also a virtual path setting here which you could set to /

Sign up to request clarification or add additional context in comments.

2 Comments

I found the Virtual Path in the Properties Window but there is not "web tab" in the Property Pages of my web application. There are only these tabs: References, Build, Accessibility, MSBuild Options, Silverlight Applications
I found the "web tab". It is called the Developer Web Server and can be found in the Properties Window
1

Is your solution configured to use IIS and not the ASP.NET Development Server? There is also a property on the web application where you can specify the port (or allow for a random port to be chosen) - port 80 is the appropriate port - this requires administrator access to the process that is launching the web site.

1 Comment

by default, ASP.NET Development Server it's used
1

Edit: I was thinking you can use your host file to redirect the user, but I checked and you can't redirect to a port.

If you have IIS7 on the machine, just make the location of your web development folder into a virtual directory on IIS.

Then you can access it by http://localhost/website/

3 Comments

How did you set up the virtual directory in IIS? Did you mark it as an application?
i just discovered I don't have IIS7 installed, only the ASP.NET Development Server was there, which is installed at the same time with VS 2010. I found this learn.iis.net/page.aspx/28/… and I'll come back after installing IIS7 on localhost
@David. Yes, set up the website folder as an application.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.