0

How port number is managed? By default 80 is for HTTP. When i run the web site project using visual studio, the development server generates different port number for each run. Though we can change port number under the project properties, Why cant it be simply 80?. What is the max size of the port number size?

If the web server uses port 80 for client request, multiple request wont cause network traffic? Or my understanding on port is wrong?

deen
  • 467
  • 2
  • 4
  • 10
  • 1
    is not 80 to avoid conflict with iis, and other visual studio running at the same machine at the same time. The max size is TCP and UDP go up to 65535 = 2^16 - Also look: http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers – Aristos Apr 21 '12 at 18:46

2 Answers2

0

This is in the properties of your Web Project under the Web tab. It can be auto-assigned or manually. Random ports are assigned by default to prevent overlap with other web projects in development.

jermny
  • 870
  • 2
  • 12
  • 23
0

Please read my post here and understand the assigning of port numbers first https://stackoverflow.com/a/54760498/2197108

For more information you can read this also https://stackoverflow.com/a/54760661/2197108

If you are developing/testing a website using visual studio then it is better to not set the port of the HTTP server (of visual studio) to 80 because 80 is a standard HTTP server i.e. any HTTP server which is already running or will run will conflict with visual studio (which you are using it as a helping HTTP server for temporary purposes).

Hope this clears your doubts.

Mosab Shaheen
  • 1,114
  • 10
  • 25