Debugging MVC application in VS2012 attempts to start IIS Express twice

旧街凉风 提交于 2019-11-27 20:26:48

w.Brian, I have followed this post since it's start and have had the exact same problem for quite a while now and I have just discovered what is causing the issue for me. I have been able to reproduce and fix the error for myself with this:

The reason VS2012 is starting iis express twice is related to being attached to a domain and being logged into a domain account. Once I logged into a completely local admin account I was able to launch and debug an MVC4 application without any issues. This is using Windows 8 Pro, VS2012 Update 1, attached to my domain, and no other software/extensions/configuration. Completely clean installation.

bot

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”

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

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

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

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

I had the same issue on Windows 8 and Windows 8.1 using my domain account. In my case changing the Documents folder path (Right click on the Documents folder -> Properties -> Location) from C:\Users\username\Documents to D:\Documents helped

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:

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):

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):

What worked in my situation was to unload the project, then to edit the csproj file. I removed all sections regarding IIS and IISEXPRESS. Then I reloaded the project and chose USE IIS EXPRESS from the project properties all over again. It then worked.

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.

There are two instances of the site FrontEnd running of course, but notice that one instance is HTTP and the other HTTPS.

It's possible to get two instances when SSL Enabled is set to True in the web site properties but the Project Url on the Web tab is set to an HTTP address.

Make them both HTTP (or HTTPS) and that might fix it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!