Search code examples
asp.netasp.net-mvcvisual-studioasp.net-mvc-5visual-studio-2019

ASP.NET MVC One Website Running on Two Different Ports


I have this weird issue on Visual Studio 2019 Community Edition. I am running an ASP.NET MVC 5 solution with only one project. The problem is every time I run it, sometimes one port is running fine, sometimes it is not.

Here is the screenshot of my IIS Express:

enter image description here

As you can see, it's only under one site and is showing multiple ports. I am not running any service, only website from ASP.NET MVC. It's erratic on my part since sometimes, one port is working, the other is not. So I need to relaunch multiple times my solution so that I can debug properly.

I already changed my port on my solution, but the first one is only reflecting on my edit, the other one, I cannot find a way how to edit the port or remove it totally.


Solution

  • I already figured it out. I just disabled the https port, and debugging my ASP.NET solution was smooth afterwards. To disable https, go to Solution explorer, select your project and press F4 on your keyboard, to see the settings:

    enter image description here

    If during debugging, you notice that your debugger shutsdown erratically make sure of the following as well:

    • Seperate your browser tab to your debugging browser tab
    • Since if you try to remove your debugging browser tab to other tabs, VS 2019 Community Edition debugging shutsdown unexpectedly. It happens on my Microsoft Edge browsers even on Chrome.
    • So seperate then and you are good to go