How does Visual Studio decide which port to run applications on?

When you run the application from visual studio, it seems to pick a random port on localhost. For example, starting the application right now, I get

http: // localhost: 3240 / ApplicationStuffHere

I understand that this port is loaded into the solution file via

VWDPort = "3240"

How is this taken? this seems pretty random.

+5
source share
4 answers

By default, ASP.NET web application projects are configured to start and run using the embedded VS web server (also known as Cassini) through a random HTTP port on the computer.

, , , :

alt text
(: scottgu.com)

+7

, , . VS2005, , .

  • ( ) ( , )
  • f4 -
  • " " False
  • ,

.

+4

This port number is initially assigned randomly, but Visual Studio will try to use the same port number every time the application starts.

+1
source

Check the properties of your web application in Solution Explorer (right-click> Properties)

A web tab is the one you are looking for.

Kindness,

Dan

0
source

All Articles