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

前端 未结 26 1501
醉酒成梦
醉酒成梦 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:12

    This worked for me:-
    Make all your IIS websites point to localhost(All Unassigned) only

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

    Try opening Visual Studio with Administrator privileges. In my case, it gave access to the IIS site and made this error go away. I was then able to switch the project to use IIS Express which doesn't seem to need administrator privileges.

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

    This solution worked for me: Right click the Project and select edit and find the following code as shown below in the picture.

    change the <UseIIS>True</UseIIS> to <UseIIS>False</UseIIS>

    OR

    change the <IISUrl>http://example.com/</IISUrl> to <IISUrl>http://localhost/</IISUrl>

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

    For my project, I had to delete these two lines from .csproj file

    <ProjectGuid>{3AA499DF-4A65-43B7-8965-D08A4C811834}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
    

    I tried deleting only the first one, but it wasn't enough.

    EDIT: As many users have pointed out, this can change your project type or mess with your source control program. I can't investigate these issues as it was a school project I do not have anymore. Please be careful when trying this. At least make a copy of what you delete.

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

    Edit the .csproj or vbproj file. Find and replace these entries

    <UseIIS>true</UseIIS> by <UseIIS>false</UseIIS>
    <UseIISExpress>true</UseIISExpress> by <UseIISExpress>false</UseIISExpress>
    
    0 讨论(0)
  • 2020-12-07 08:18

    You can load the project without setting the value of attribute UseIIS to true. Simply follow the below steps:

    In the mywebproject.csproj file--

    Delete the tag < IISUrl>http://localhost/MyWebApp/< /IISUrl> and save the file. The application will automatically assign the default port to it.

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