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

后端 未结 30 1751
北恋
北恋 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:44

    The solution that worked for me was to: Close the VS project In File Explorer, navigate to the project and delete the entire ".vs" folder Restart the project Run as "Debug" Works Apparently, it has something to do with the "applicationhost.config" file.

    Enjoy!

    0 讨论(0)
  • 2020-12-12 13:45

    Try this first if it was working and suddenly stopped:

    • Close Visual Studio
    • Kill iisexpress.exe processes
    • Reopen Visual Studio
    0 讨论(0)
  • 2020-12-12 13:49

    I just Cleaned my solution, Then Re-Built it and finally hit F5 and it worked! So simple.

    0 讨论(0)
  • 2020-12-12 13:49

    The issue may be because [√] Enabled SSL was selected for your project (see the Debug tab in the project settings window), but Visual Studio decides to be dumb and setup something like http://localhost:32396. The reason it fails is because 1. it is not HTTPS, and 2. the cert is not valid. To force it, you need to use a port in the range 44300-44398.

    See https://stackoverflow.com/a/24957146/1236397

    0 讨论(0)
  • 2020-12-12 13:51

    I had the same issue, i was able to solve it by changing the Port number.

    1. Right click on the project and select properties

    2. Go to the Debug section

    3. Under Web Server Settings change App URL port [just increase by one :)]

    0 讨论(0)
  • 2020-12-12 13:51

    I was able to toggle this error by changing a single thing. In my ASP.Net Core 1.0 RC2 Web Application project's launchSettings.json file:

      "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iisExpress": {
          "applicationUrl": "https://localhost:18177/",
          "sslPort": 0
        }
      },
    

    to

      "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iisExpress": {
          "applicationUrl": "http://localhost:18177/",
          "sslPort": 0
        }
      },
    

    I had changed to https in an attempt to run the project using that protocol. Apparently this is not the place to make that change. I suspect it is creating multiple bindings on the same port, and IIS Express doesn't like that.

    0 讨论(0)
提交回复
热议问题