Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting static port number on Visual Studio Dev Server with a WebSite project

I have a WebSite project in Visual Studio 2008 (not a Web Application project!)

How do I set the ASP.NET Development startup port to a static port in a WebSite project?

like image 977
Alex Czarto Avatar asked Jul 14 '09 16:07

Alex Czarto


People also ask

How do I change the port of a website in Visual Studio?

Here is a fast recipe on how to manually change the port number to whatever number you want: 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.

How do I find my project port number?

Open the command prompt. Type “netstat -ano” without the quotes. -a:Displays all active TCP connections and the TCP and UDP ports on which the computer is listening. -n: Displays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.

What is the default port number in which .NET Web server runs?

We know that ASP.NET Core Application runs under Kestrel Server with default port number http://localhost:5000.


1 Answers

To specify a port for the ASP.NET Development Server - WebSite / WebServices projects

  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. Click outside of the Properties pane.This saves the property settings.
  4. Each time you run a file-system Web site within Visual Web Developer, the ASP.NET
    Development Server will listen on the specified port.
like image 193
backslash17 Avatar answered Sep 18 '22 20:09

backslash17