Answered by:
VS 2013, Unable to launch the IIS Express Web Server

Question
-
User739463857 posted
Hi,
Firstly, appologies if this thread appears twice, my first one has dissapeared with no trace, no emails, nothing.
I've got a newly built 64 bit Windows 8 machine running an x86 targeted asp.net web project. This project also hosts a Silverlight project.
On one machine, and this one only I get a very odd problem.
With IIS Express not running, I try to run the solution I get a message poping up saying "Unable to launch the IIS Express Web Server". A toast notification pops up from IIS Express saying "one or more errors occured...". Clicking on this notification tells me "The specified port is in use. Port 53150 is already being use by process IIS Express".
Opening the log file that this popup links to I get the following line:- Failed to register URL "http://localhost:53150/" for site "xxxx.xxxxx" application "/". Error description: Cannot create a file when that file already exists. (0x800700b7).
IIS Express is now running and I can browse the site on the port it complains about.
If I open the folder where IIS Express has put the log file, there are two logs for the same time (down to the second), one gives me the error line, the other has a filename matching the process ID of the running IIS Express giving me a sucess line.
It appears to me that VS 2013 is attempting to run two copies of IIS Express. This machine was reinstalled from a 64 bit Windows 7 machine that had the same problem. I do not think hardware is to blame here, it has to be an installation or configuration fault.
I'm really unclear what is going on and would really apprecate a pointer or two.
Monday, November 25, 2013 12:54 PM
Answers
-
User739463857 posted
Shortly after my last post I raised a case with Microsoft Support.
After a great deal of work, involving log files, snapshots and them looking at the iis express source code, the problem has been found. If your path to your iisexpress config file contains the string bg something gets treated differently and iisexpress does something differently.
The solution right now for me is to create a new domain account that doesn't include bg. Simply renaming my account will not change the path to my users folder on my machine.
The file version I have for iisexpress.exe is 8.0.8418.0.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 31, 2014 5:37 AM
All replies
-
User-1454326058 posted
Hi gutteridge,
Thanks for your post!
I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.
Thanks
Best Regards
Tuesday, November 26, 2013 4:19 AM -
User739463857 posted
Thanks.
I've now managed to get a different error message.
I was wondering if it was an installation issue, as I installed Visual Studio on both OS builds. I've modified the installation of Visual Studio 2013 Premium and remove the previously installed components LightSwitch, Tools for Maintaining Store apps for Windows 8 and the Windows Phone 8.0 SDK.
The message I now get is "Process with an Id of xxxxx is not running". As before IIS Express has been started, but I am only getting one log file with success messages.
I've spotted this https://connect.microsoft.com/VisualStudio/feedback/details/806692/vs-2010-2012-2013-ultimate-iis-express-process-with-id-of-xxxx-is-not-running# which seems similar to my problem, but the suggested workarounds do not work.
I have also uninstalled Visual Studio 2012, but this hasn't made any difference.
Tuesday, November 26, 2013 4:39 AM -
User-460438974 posted
I am having the exact same issue. This is on a Windows 8 install that was upgraded to 8.1, and then I installed VS 2013. We had not been using IIExpress before (only in the built in web development server). I ran into the exact same issue about the port in use and then the process ID not available.
Tuesday, December 3, 2013 10:59 AM -
User-460438974 posted
Any status on this, as I am experiencing the same issue.
Tuesday, December 3, 2013 11:00 AM -
User1442230747 posted
Hi,
I am trying to reproduce this issue by creating a sample web application(Changed the platform of the application to x86) in VS2013 Premium on a Windows 8.1 but I am not getting this issue. Is there a specific way to reproduce this issue.
Regards
Ravindra
Monday, December 23, 2013 2:13 AM -
User739463857 posted
Hi,
I've not found a specific way to generate the fault, it seems to be an installation issue. I've created a new ASP.NET Web Application accepting all the defaults. As soon as it's been generated, I've run the application and got the same error.
In a team of 10 development machines, it is only one of my two machines that has this problem.
I've attempted to recreate the problem with a virtual pc but have been unable to do so. I'm unable to recreate the condition exactly as I am unable to add the machine to the domain.
I captured the object access on both the 32 and 64 bit IISExpress.exe in the event log, but am unable to post that information here as the logs include security information.
In the logs I can see the process VS2013 is expecting being created (P1). I also see the process that I can browse the project on being created (P2) and the creation of the iis tray process (P3). I can see an interaction between P2 and P3, not not P1 and P3. All the processes being created are 32 bit.
Any ideas on how to progress would be appreciated.
Thanks,
Ben.
Monday, January 6, 2014 6:54 AM -
User739463857 posted
Hi,
Creating the default project in VS2012 and VS2010 (setting 2010 to use iis express) also exhibit the same problem. It has to be an IIS Express installation/configuration issue.
I've now repaired and reinstalled iisexpress and continue to get the same error. Before the repair I removed the IISExpress folder in MyDocuments. The same for the re-install.
I'm going to have another go at a full re-install and document everything I do.
Thanks,
Ben.
Monday, January 6, 2014 10:04 AM -
User739463857 posted
Hi,
I've used the windows 8 refresh tool, installed as I normally would and the problem still appears.
I've then done a format of the system drive, and a full clean install of Windows 8 Enterprise.
Machine was added to domain, and my domain account was added to the local administrators. McAfee Virusscan Enterprise 8.7.0i was installed and updated. UAC set to never notify and remote desktop access allowed for my domain account.
Applied all Updates via the Control Panel.
Installed Visual Studio 2010 from MSDN (en_visual_studio_2010_premium_x86_dvd_509357.iso) Accepting the defaults and changing nothing.
Applied all updates. Sql Server 2008 Service pack 3 failed to install.
Installed Visual Studio 2012 from MSDN (en_visual_studio_premium_2012_x86_dvd_2262337.iso) Accepting the defaults and changing nothing.
Applied all Updates via the Control Panel.
Loaded VS2010 for the first time, configured for a c# developer. Closed.
Loaded VS2012 for the first time, configured for a c# developer. Help downloaded. Closed.
Installed Visual Studio 2013 from MSDN (en_visual_studio_premium_2013_x86_dvd_3175275) Accepting the defaults and changing nothing.
I then opened Visual Studio 2013, created a new ASP.Net Web Application. Pressed F5 and am presented with the "Process with an id of xxx is not running". IIS express is running, and I can use it to view the project I have just created.
I'm lost now at how to continue. Any ideas would be very welcomed.
Thanks,
Ben.
Tuesday, January 7, 2014 12:48 PM -
User-460438974 posted
Thanks for reproducing the problem. I have not had time to work on this issue and have just switched back to VS2012 for the project I am working on. My machine is bound to a domain and I only have VS 2012 and 2013 installed.
Tuesday, January 7, 2014 12:57 PM -
User739463857 posted
Hi,
Last attempt at runling anything out.
I've used the windows 8 refresh tool again.
Applied all Updates via the Control Panel.
Installed Visual Studio 2013 from MSDN (en_visual_studio_premium_2013_x86_dvd_3175275) Accepting the defaults and changing nothing.
I then opened Visual Studio 2013, created a new ASP.Net Web Application. Pressed F5 and am presented with the usual error.
The one thing that is consistent is the machine. We do have an identical machine purchased at the same time that runs visual studio 2013 without this problem.
I'm going to run some diagnostics on the hardware now.
Thanks,
Ben.
Wednesday, January 8, 2014 6:26 AM -
User739463857 posted
All my hardware checks have finished and passed sucessfully.
I've seen the light at the end of the tunnel however.
The only other thing that remains constant is my domain and domain account.
I created a local user with admin rights. Logged in as that user and managed to run a web project with no problems. Loggin back into my domain account raises the same error as before.
I'm looking to see if any group policies or user settings on the domain are causing an issue.
gcomputer.net, if you are able can you see if a local user (assuming you are in a domain) works?
EDIT: It looks to be a similar or the same problem as here https://connect.microsoft.com/VisualStudio/feedback/details/778864/vs2012-is-spawning-two-iisexpress-processes-when-attempting-to-debug
Another edit: It looks like it's my domain account. Someone else logged into my machine and it works fine for them. If I log into their machine I get the same fault as on mine.
Wednesday, January 8, 2014 9:41 AM -
User-460438974 posted
I tried both an old local account tied to my Microsoft account and a new account not tied to any microsoft account using VS 2013, and I still get the Process with an Id of 8920 is not running. Though I am just trying the same project that works in VS 2012 with the built in dev web server.
I'll try creating a new project and see if that works.
Wednesday, January 8, 2014 11:03 AM -
User1442230747 posted
Hi Ben,
You could try running the Process Monitor tool, reproduce the error and look for “Access Denied” in the “Result” column. You can then configure the required permissions accordingly.
Also as your account is part of local Administrators group try running visual studio as Administrator and see if you can reproduce the issue.
How does it behaves when running in safe mode using devenv.exe /SafeMode.
Regards
Ravindra
Wednesday, January 8, 2014 10:48 PM -
User739463857 posted
Hi,
Running the Process Monitor tool I have a couple of Access denied messages for the registry both have been "fixed" but I'm not sure they needed to be. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap.
Running Visual Studio as an Administrator has the same problem as does safeMode. Administrator with safe mode does the same.
However I have noticed one thing has changed (I'm not clear when this changed), If I run the solution I get the error. If I then run it again I get the browser up, however it does not load any symbols so I'm not really any closer to a usable development environment. The ASP.net debugger is enabled in the project settings.
EDIT: If I run 2013 normally, create a web application, run it, dismiss the error then run it again I get the browser up. I can then attach to the running IISExpress.exe and debug. not an ideal solution but does allow me to get some work done.
Thursday, January 9, 2014 3:51 AM -
User739463857 posted
Hi,
As the problem is following me around to other machines, we made the decision to delete my domain account.
We copied another users account and created a new one for me. I log on to my machine and I still get the problem. If I logon to another users machine I still get the problem. Creating an account from scratch does exactly the same. Other users can run with out problem on their machines and on mine.
Using a test account created a long time ago works fine.
The problem, at least for me, must be related to the domain somehow.
We are a Microsoft Partner and have the option of using a support call from them, so we are going to use that.
If we make any progress I will update this thread.
Thanks,
Ben.
Thursday, January 9, 2014 9:08 AM -
User-524666228 posted
I had the same problem and I think that I fix It (my project is in vs 2013 and it now working fine with IIS Express).
In the applicationhost.config in the section declaration of <applicationPools>...</applicationPools> I move Clr4IntegratedAppPool under of all:
<applicationPools>
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true">
<processModel loadUserProfile="true" />
</add>
<applicationPoolDefaults managedRuntimeLoader="v4.0">
<processModel />
</applicationPoolDefaults>
</applicationPools>Monday, January 13, 2014 6:01 AM -
User-460438974 posted
Which ApplicationHost.config did you change, the one that gets created in %USER%\Documents\IISExpress\config\applicationhost.config?
Changing that one did not help as I am still getting no process with ID of ####.
Monday, January 13, 2014 12:23 PM -
User1442230747 posted
Can you try running
iisexpress.exe /apppool:Clr4IntegratedAppPool from command line and see if it is able to register the site.
Regards
Ravindra
Monday, January 13, 2014 12:34 PM -
User-460438974 posted
Well, that is interesting. After stopping the IIS Express process and then running that command from an admin command promt, then load VS 2013 and the project, it is now working.
Monday, January 13, 2014 12:47 PM -
User-524666228 posted
c:\Program Files\IIS Express>iisexpress.exe /apppool:Clr4IntegratedAppPool
Starting IIS Express ...
Successfully registered URL "http://localhost:3402/" for site "ATMFrattali" application "/"
Registration completed IIS Express is running. Enter 'Q' to stop IIS ExpressFor this project I have virtual directory created from other project of solution.
Tuesday, January 14, 2014 2:36 AM -
User739463857 posted
Test you can hit break points after hitting F5. I tried this, but had to run vs in safe mode as admin for it to work. It wouldn't allow me to hit breakpoints unless I attached the iisexpress process.
Tuesday, January 14, 2014 2:38 AM -
User-524666228 posted
After many hours that I was spending to reboot my pc for testing, and many change on application.config in C:\Users\xxx\Documents\IISExpress\config folder I finding how to solve the problem in my Solution with multi project in vs2013 that run on IIS EXPRESS.
First step is to insert Clr4IntegratedAppPool in original position. Then for my project that hold dmbl file I inserted "Managed Pipeline Mode=Classic" (from Vs 2013), whereas all the other project have "Managed Pipeline Mode=Integrated".If the project don't manage Integrated Managed Pipeline Mode can cause error in IISExpress.
Tuesday, January 14, 2014 11:02 AM -
User739463857 posted
Well I thought I'd got it working. Using the old test account renamed to match my previous user name, I managed to get everything (vs2013 wise) working fine on both my machine and others. I did have issues with the user profile not matching up and tempory profiles etc. So we decided that it would be best to reinstall a final time.
After getting my machine up and running, and logging in with my new account, pressing F5 is 2013 caused the same error as before.
Logging on to other machines and performing the actions does the same.
As I thought the problem was related to my domain account I didn't really pay attention to the order I was installing. I've got Office 2013, SQL Server 2012, HyperV, McAfee VirusScan Enterprise and Skype installed.
Can you try running
iisexpress.exe /apppool:Clr4IntegratedAppPool from command line and see if it is able to register the site.
Regards
Ravindra
This registers the same IIS express as Visual studio does. I still get the error when I try to run (F5).
Wednesday, January 15, 2014 3:40 AM -
User739463857 posted
Shortly after my last post I raised a case with Microsoft Support.
After a great deal of work, involving log files, snapshots and them looking at the iis express source code, the problem has been found. If your path to your iisexpress config file contains the string bg something gets treated differently and iisexpress does something differently.
The solution right now for me is to create a new domain account that doesn't include bg. Simply renaming my account will not change the path to my users folder on my machine.
The file version I have for iisexpress.exe is 8.0.8418.0.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 31, 2014 5:37 AM -
User490090656 posted
Thanks for sharing these details, I have been digging on this issue for days now and come to find out that it is from my username having a "bg" in it. I sure hope Microsoft resolves this quickly.
Thursday, April 3, 2014 2:44 PM -
User-460438974 posted
So this must be my issue. Don't know how we'll go around the limitation, as it would be a lot of work to create a new domain account.
Thursday, April 3, 2014 3:16 PM -
User-1629709220 posted
I'm having this same issue, but there is no BG in my username. It has to be something else
Monday, April 21, 2014 5:32 PM