ASP.NET 5 MVC: unable to connect to web server 'IIS Express'

后端 未结 30 2119
北恋
北恋 2020-12-12 13:28

What I\'m doing:

  • Opening Visual Studio Community 2015
  • File -> New -> Project
  • Under Visual C#: Web -> ASP.NET Web Application
  • Web App
30条回答
  •  长情又很酷
    2020-12-12 13:39

    For me the problem was that an other process was using the same port. (In my case it was outlook that was using the same port as my site and thus my site couldn't start)

    Yes you can change the local port, but if you are running an API or something that other applications need, you don't always want to do this.

    To get a list of what applications are using what port open CMD and type "netstat -aon" You will get a list of ports. Find the port that your site should use, or that you want to use and write down / remember the PID.

    Now open task manager and click on the tab 'details'. Find the process with your PID and end it. Now you should be able to start IIS Express with that port.

提交回复
热议问题