How Change ASP.NET Core Port in visual Studio 2017

In this blog post, I will show you how to change the default assigned port of an ASP.NET Core project in Visual Studio 2017.

The need to change the default port came while I was taking SSO configuration with Okta and ASP .NET core application and I had to use a specific port number in Visual Studio.

This article will work with any Visual Studio application that uses http protocol.

Get Started

In my case, I am using Visual Studio 2017 version 15.7.6 which is the latest release as of August 2018.

Change Port

To change the port number, I right click on my project -> Properties

From the application properties screen, I will click on Debug under the Web Server Settings I will change the port number next to APP URL.

For example is the port number is set to 54327 as configured as http://localhost:54327 I will simply change the port number.

After I made the change the new port should look like the screenshot below.

Conclusion

Changing default assigned port is ASP.NET Core application or any .NET application is something you will need to do as part of normal development and testing lifecycle.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.