Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Development Server using wrong port

Related to a previous issue that I thought was resolved and actually isn't...

My Visual Studio 2008 installation may be a bit messed up, I think.

  1. When my ASP.NET project is set up to use VS Dev Server with a fixed port, I get the "Port in use" error described in the linked question.
  2. When my project is set up to use a random (auto-assigned) port number, it works, but it launches the browser using a port number 3 less than the actual Dev Server port number (e.g. if the port number is 1903, the browser launches to http://localhost:1900/)
  3. If I make changes to the project settings, they do not "take" until I save and restart Visual Studio.

Any ideas how to track this one down?

Thanks!

like image 870
Shaul Behr Avatar asked Mar 03 '09 18:03

Shaul Behr


People also ask

How do I change the port in Visual Studio?

In Solution Explorer, right-click the name of the web application and select Properties. Click the Web tab. In the Servers section, under dropdown selection for IIS Express, change the port number in the Project URL box. To the right of the Project URL box, click Create Virtual Directory, and then click OK.


1 Answers

I had a similar problem which hit my 2 main machines at the same time. On investigating I found it to be related to the Eset personal security (guessing a recent update messed something up). To solve it I excluded VS2008 from the active browser filtering - this is in: setup -> advanced firewall setup -> antivirus & anti spyware -> web access protection -> HTTP -> webbrowsers

Deselecting vsdev in here fixed the problem - interestingly enough disabling the firewall and antivirus / antispyware did not solve the issue, so it is worth looking for a similar setting if you are running different security software

like image 137
Macros Avatar answered Sep 19 '22 06:09

Macros