The Web Application Project […] is configured to use IIS. The Web server […] could not be found.

前端 未结 26 1499
醉酒成梦
醉酒成梦 2020-12-07 07:30

I have a web project in my solution file that is \"unavailable\" when I open the solution. When I right-click on the web project and reload the project, I get the following

相关标签:
26条回答
  • 2020-12-07 08:07

    Check if IIS Express is installed. If IIS Express is missing, Visual Studio might discard the setting <UseIISExpress>false</UseIISExpress> and still look for the express.

    0 讨论(0)
  • 2020-12-07 08:07

    I ran into this issue when the <ProjectTypeGuids> element in the .csproj file contained the unit test project GUID: {3AC096D0-A1C2-E12C-1390-A8335801FDAB}.

    Removing it made the project load without problems.

    0 讨论(0)
  • 2020-12-07 08:08

    In my case, the "Default Web Site" in IIS didn't have a binding for localhost on port 80. You should have a binding for whatever your value in the .csproj file is.

    0 讨论(0)
  • 2020-12-07 08:11

    In my case I wanted to switch from http to https, so I had deleted http from IIS. In my .csproj.user file found that I still had:

    <IISUrl>http://localhost/</IISUrl>
    

    So I changed it to:

    <IISUrl>https://localhost/</IISUrl>
    
    0 讨论(0)
  • 2020-12-07 08:11

    In my case, the url referenced in the csproj file was incorrect.

    It needed to be prefixed with www.

    I made the changes, saved the file and the project loaded fine.

    0 讨论(0)
  • 2020-12-07 08:11

    Follow this completed solution step by step. it's works for me in VS 2017.

    1. Open Command prompt in administrator mode

    2. Open File explorer and got to .NET Framework folder

        Eg:C:\Windows\Microsoft.NET\Framework\v4.0.30319
      

      v4.0.30319 this is my .NET folder. you want to select your relevant folder.

    3. in CMD - Go to .NET folder path

      cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
      
    4. Execute below command in CMD

      aspnet_regiis.exe -i
      

      You can see this message finally - Finished installing ASP.NET (4.0.30319.0)

      iisreset
      

      You can see this message finally - Internet services successfully restarted

    5. Open IIS in your computer (if not config Follow this)

      1. Go to Site and right click

      2. Add WebSite

      3. Fill - Site name and select physical path

      4. Then type port number (you can find port number in .csproj file and port number must equal with (IISUrl)

      EG : <IISUrl>http://localhost:15724/</IISUrl> my port is 15724
      

      Note : you cannot create port 80 number. because it used default IIS page

      1. Click Ok
    6. Open visual studio with administrator permission

    7. Then right click and reload your project

    Your Problem may be solved.

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