After clicking "Debug" in vs2008. The port of the asp.net development server is 2 larger than the port on the browser opened during debugging, which causes the browser port number to be manually changed every time debugging is required.As shown below:

Solution one:Specify port for asp.net development server

1. In the Solution Explorer,Click the name of the application.

2. In the Properties pane, click the down arrow next to Use Dynamic Port.Then select "false" from the drop-down list.

This allows editing the Port Number attribute.

3. In the Properties pane, click the text box next to Port Number.Then type a port number.

4. Click outside the Properties pane.This action saves the property settings.

Whenever you run a file system website in visual web developer,asp.net development server will listen on the specified port.

Solution two:Specify a web server for the website

1. In the Solution Explorer, to specify a web server for a website, right-click the website name,Then click "Properties Page."

2. In the "Properties Page" dialog box,Click the Startup Options tab.

3. Under Server, click Use custom server.

4. In the Base URL box, type the URL that visual web developer should launch when running the current website.

Solution three:Upon inspection, this issue was caused by antivirus software.I use nod32 (ess or eav), you can turn off related functions in nod32 to solve this problem.

1. Open the main interface of nod32,And switch to advanced mode.

2. Click "Advanced Settings" in the "Settings" menu.

3. Select "web access protection->http" in the tree menu and turn off "enable http check".

The above three sets of schemes,I hope there is a set that can solve the problem of incorrect port when debugging asp.net2005/2008.

  • Previous Knowledge of Java's use of this keyword and method overloading
  • Next In-depth analysis of jsonp protocol principle