I see that time to time localhost port number changes (http://localhost:1519/ ....).
Basically how does it being set or chosen? And when does it change?
Thanks!
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. To the right of the Project URL box, click Create Virtual Directory, and then click OK.
To change the port the application is using, Open the file lunchSetting. json. You will find it under the properties folder in your project and as shown below. Inside the file, change applicationUrl port (below is set to 5000) to a different port number and save the file.
It's just a random number:
When you use the ASP.NET Development Server to run a file-system Web site, by default, the Web server is invoked on a randomly selected port for localhost.
Although you can specify it yourself by disabling dynamic ports.
Take a look at : How to: Specify a Port for the ASP.NET Development Server
You can set it here:
Choose "Use dynamic port = false"
alt text http://img110.imageshack.us/img110/8444/59650554.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With