Debugging MVC application in VS2012 attempts to start IIS Express twice

前端 未结 11 1031
执念已碎
执念已碎 2020-12-05 13:12

UPDATE

I\'m certain this is a Visual Studio bug with no obvious solution. I\'ve encountered a number of people who have the same exact issue. I ha

相关标签:
11条回答
  • 2020-12-05 13:52

    Just in case, do you have 127.0.0.1 localhost defined in folder/system32/drivers/stc/hosts ? Otherwize, you can check here, this might just be the key.

    Cheers

    0 讨论(0)
  • 2020-12-05 13:57

    Hi maybe this solutions could help you.

    • Manage RuntimeVersion=”4.0″ to “4.0.30319″

    Example:

    <applicationPools>
    <add name=”Clr4IntegratedAppPool” managedRuntimeVersion=”v4.0.30319″ managedPipelineMode=”Integrated”     CLRConfigFile=”%IIS_USER_HOME%\config\aspnet.config” autoStart=”true” /><br/><br/>
    

    reference:Issue: Visual Studio 2012 > “Unable to launch the IIS Express Web Server”

    • Use Process Monitor to solve the issue

      reference: Debugging the “Unable to launch the IIS Express Web server.” error from Visual Studio 2012.

    • Try switching to the visual studio built in web host and run it. After you run it once you should be able to switch back to iis express

      reference: from the forum Unable to launch the IIS Express Web server

    • try re-installing Visual Studio 2010 SP1, which contains iis-express.
    • disable the logging module by modifying the applicationhost.config, which is located in the %userprofile%\documents\IISexpress\config directory. To do so you will need to comment out a couple lines in the file.

    Under the / element, comment out the line

    <add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" />
    

    Under the // element, comment out the line

    <add name="HttpLoggingModule" lockItem="true" /> 
    

    After saving your changes try restarting iis express.



    reference: from stackoverflow forum: Unable to launch the IIS Express Web server

    0 讨论(0)
  • 2020-12-05 13:57

    I ran into an identical issue today (IISExpress trying to start twice and failing when hitting Debug in Visual Studio) while helping another developer with a web forms site. After trying several solutions, we found that we could resolve the problem by:

    • Creating a new, empty Visual Studio solution
    • Adding an "Existing Website" pointing to a new, empty folder
    • Copying the contents of the existing (non-working) website into the new folder we created

    Simply removing and re-adding the website to the original solution did not work, nor did creating a new solution and adding back the existing site. I can start IISExpress from the command line just fine.

    After doing a before-and-after comparison of the .SLN files I believe that is where the problem lies. Since I had found a workaround I didn't spend a lot of extra time on it. Obviously recreating the entire solution from scratch may not be an option for larger projects (ours was a very small one) but hopefully this at least points in the right direction.

    0 讨论(0)
  • 2020-12-05 13:58

    This week, I experienced this identical issue: IIS Express starts, but VS complains it couldn't start IIS Express and debugging fails.

    I finally resolved the issue by applying the June 2014 hot-fix to IIS Express:

    • http://www.microsoft.com/en-us/download/confirmation.aspx?id=43380

    We (my IT support and I) found this hotfix after stumbling over and following a very unlikely problem. Apparently, MS verified a bug in IISExpress 8.0 which results in it misbehaving if any part of the application name contains the letter combination "bg" (my username begins with bg):

    • https://connect.microsoft.com/VisualStudio/feedback/details/848945/visual-studio-2012-iis-express-fails-to-start-if-application-name-contains-bg

    Note: VS 2013 Update 4 already contains this fix, which may be why some people had success simply by updating to VS 2013.

    Some other links we found concerning the issue (you may have to skim a bit to find the topic):

    • http://forums.asp.net/t/1953087.aspx?VS+2013+Unable+to+launch+the+IIS+Express+Web+Server
    • https://connect.microsoft.com/VisualStudio/feedback/details/865116/process-with-an-id-of-id-is-not-running
    0 讨论(0)
  • 2020-12-05 14:02

    Right click you MVC project /*all of them one by one*/
    go to properties
    go to web tab
    you must be having having checked "Use local IIS webserver" radio box
    in the textbox below it make sure no to projects have the same port which in your case is 8080

    0 讨论(0)
  • 2020-12-05 14:05

    Have a look at the answer here:

    http://forums.asp.net/t/1953087.aspx?VS+2013+Unable+to+launch+the+IIS+Express+Web+Server

    It was strange behavior on a Windows 8 machine when 'bg' was part of the username

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