How to fix a port number in asp.NET development server

前端 未结 3 1983
野趣味
野趣味 2021-01-23 15:10

Yesterday I was writing a stand-alone .html web-page. Every time I viewed it, the file was run in the local host. Thus a port number was assigned by my OS (Windows 8).

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-23 15:42

    To specify a port for the ASP.NET Development Server:

    1. In Solution Explorer, click the name of the application.
    2. In the Properties pane, click the down-arrow beside Use dynamic ports and select False from the dropdown list. This will enable editing of the Port number property.
    3. In the Properties pane, click the text box beside Port number and type in a port number.
    4. Click outside of the Properties pane. This saves the property settings. Each time you run a file-system Web site within Visual Web Developer, the ASP.NET Development Server will listen on the specified port.

    more info: How to: Specify a Port for the ASP.NET Development Server

提交回复
热议问题