The program iisexpress.exe' has exited with code 0
Asked Answered
P

15

12

When I try to start my newly created WebApplication I get this error:

The program '[73635] iisexpress.exe' has exited with code 0 (0x0).

I have already searched through internet and none of this solutions helped me:

  • Change the port number (and virtual directory)
  • Start as administrator
  • Deleting the .vs folder
  • Deleting the IISExpress-folder under Documents
  • Use 64-bit of version of IISexpress
  • Restart the computer
  • Press CTRL-F5

I just want to build the page. I have done no changes to the original MVC5 website.

EDIT: I thought it was an error, but in the comment @Lex li says it is not an error. When I search through this on internet it look like many people had experienced it before.

I just created a new MVC application. Without doing any changes I try to run it with IIS Express (Google Chrome), but it just stops, without anything more. Chrome gives me this error: This site can’t be reached localhost refused to connect.. And I get no errors what so ever. It just wont start, and Visual Studio Diagnostic Tools stop running at the same time Chrome closes itself.

EDIT 2: I have been able to dig a bit more:

C:\Program Files (x86)\IIS Express>iisexpress.exe /trace:error
Starting IIS Express ...
Initializing the W3 Server Started CTC = 2601562
Error initializing IISUTIL's LocalRequest.  hr = 80072afa
Terminating W3_SERVER object
Start listenerChannel http:0
Initializing the W3 Server Started CTC = 2610156
Error initializing IISUTIL's LocalRequest.  hr = 80072afa
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Unable to start iisexpress.

I have realised that IISExpress i struggeling with something. I was able to get this error, when I presset CTRL - F5: unable to launch iis express web server.

Scan the folder C:\Users\xuser\source\repos\CMySQL\CMySQL for project files.
1 project(s) are detected.
* CMySQL.csproj


Project file: C:\Users\xuser\source\repos\CMySQL\CMySQL\CMySQL.csproj.
IIS Express configuration file: C:\Users\xuser\source\repos\CMySQL\.vs\config\applicationHost.config.
Analyze ASP.NET project.
Extract web project settings.
UseIIS: True
AutoAssignPort: True
DevelopmentServerPort: 61708
DevelopmentServerVPath: /
IISUrl: http://localhost:6549/
NTLMAuthentication: False
UseCustomServer: False
CustomServerUrl: 

SaveServerSettingsInUserFile: False
UseIISExpress: true
IISExpressSSLPort: 
IISExpressAnonymousAuthentication: 
IISExpressWindowsAuthentication: 
IISExpressUseClassicPipelineMode: 
UseGlobalApplicationHostFile: 
Scan all bindings.
IIS Express is used for this project.
Binding *:6549 (http).
A matching binding is found for http://localhost:6549/.
Penates answered 27/5, 2019 at 18:40 Comment(8)
Code 0 means "no error". What exactly is the problem here? Please describe with more details.Grassplot
Added some more information, @LexLiPenates
You'd better run a project diagnostics report and attach it as part of question, docs.jexusmanager.com/tutorials/vs-diagnostics.html It is impossible to talk about such with key information like that.Grassplot
@LexLi, I have added the diagnostics. But it does not mean much to me.Penates
Your settings seem to be good, but Error initializing IISUTIL's LocalRequest. hr = 80072afa is something undocumented. Except talking to Microsoft, I don't think there is much you can do, developercommunity.visualstudio.com/spaces/8/index.htmlGrassplot
8 makes it an error, 7 says it is a Windows error code. That makes 0x2afa = error 11002, WSATRY_AGAIN, "This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server." What hostname other than "localhost" it is trying to resolve is not terribly obvious, hopefully your machine's hosts file hasn't been messed with.Eyecup
It is nothing wrong with my hostfile. Just checked it.Penates
@Devloop80, could you please share the content of the .....\PROJ\.vs\PROJ\config\applicationhost.config file, in particular the content of the site element where the the name attribute is PROJ? (Where PROJ is the name of your project, of course)Tatar
A
15

My problem was solved only by deleting the .vs directory.

Alanna answered 14/10, 2020 at 18:31 Comment(2)
I had to close and reopen Visual Studio too, after deleting the .vs folder.Cataphyll
I struggled with this, but this tip worked. Thank you.Burrussburry
F
3

For my , only worked remove the ISSExpress folder locate in c:\users"youruser"\Documents\ISSExpress

Fredericton answered 5/8, 2021 at 1:16 Comment(0)
E
2

Closing all browser windows worked for me.

But that was after doing this first: File -> Open -> Web Site etc. as described here - I removed the website from IIS Express:

Why and how to fix? IIS Express "The specified port is in use"

not sure if I had to do both of these but it worked for me.

Eicher answered 13/11, 2019 at 17:33 Comment(0)
C
2

The problem occurred with me as well on an old ASP.NET WebForms project running .NET 4.8. It occurred after having a fresh new install of Visual Studio 2022.

I've tried several options from this thread, like deleting the .vs folder, as well as deleting bin and obj, changing .csproj settings etc. to no avail.

But what worked for me was disabling Hot Reload and tinkering around with Just-in-Time debugger settings. This all in the Visual Studio options:

Step 1. Options > Debugging > General

Disable Hot Reload entirely.

enter image description here

Step 2. Options > Debugging > .NET /C++ Hot Reload

Disabled all options.

enter image description here

Step 3. Options > Debugging > Just-in-Time

This dialog showed the following message:

Another debugger has registered itself as the Just-In_Time debugger. Fix by enabling Just-In-Time debugging or running Visual Studio repair.

Only 'Native' was selected. Also checked 'Managed (.NET Framework)'. This prompted a message saying that Visual Studio needed to restart with elevated permissions to enable it. After doing so, it magically run again.

Subsequently, I don't need the elevated permissions anymore after a final restart of Visual Studio.

enter image description here

Contrarious answered 2/5, 2024 at 10:11 Comment(0)
K
0

This happens to me when I try to run an application in localhost that was previously removed.

I needed to remake a local website in IIS with a path to the fisic folder where Web.config was located. Optionally, you can register at C:\Windows\System32\drivers\etc\host your local web site as anyname like adding the line:

127.0.0.1 yourlocalsite.Web

and using this name in the IIS associations as the host name for your site.

You can then open it in browser using yourlocalsite.Web.

Kurt answered 11/9, 2019 at 16:31 Comment(0)
F
0

In my case. As I also use the weblogic oracle, i has needed set in my regedit in '\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP' and in a property value 'start' should be set to 3. And restart the machine. This work for me.

Fixative answered 6/9, 2021 at 15:49 Comment(0)
P
0

For me, I solved this problem by closing IIS Express process. So if u tried that was said above and it's still not working, try to change the IP port of your project if it is a web project, and then close IIS Express process.

Penniepenniless answered 29/9, 2021 at 13:44 Comment(0)
B
0

If localhost uses the same port number for two projects, it could cause the issue.

For my case, one application runs at port 30000, other project tries to run at port 30000 too.

So the best practice would be to use different port number if possible.

Bemis answered 19/10, 2021 at 2:46 Comment(0)
P
0

My problem was solved by restarting the computer.

or

You can try by the remove your temp data.

Peculiar answered 5/12, 2021 at 10:51 Comment(0)
A
0

I found my IP and DNS act strangely. Before I have deleted winsock and winsock2 entry on regdit. Just export these entry from other normal computer and import. This fixed my problem.

Acescent answered 27/12, 2021 at 1:56 Comment(0)
D
0

I had a problem with applicationhost.config. Apparently there were single quotation instead of souble quotation marks

enter image description here

Duologue answered 9/7, 2022 at 17:46 Comment(0)
C
0

for this i installed the dotnet-sdk-3.4.424-win-64xx from below link https://dotnet.microsoft.com/en-us/download/dotnet/3.1 after this i restarted the machine it worked for me

Choking answered 27/10, 2022 at 11:17 Comment(0)
A
0

I deleted my .vs folder, restarted my computer and then ran the project with net 6.0 instead of net48. This fixed the issue for me.

Aldos answered 28/8, 2023 at 18:7 Comment(0)
V
0

Go to your API project settings-> Web -> Create virtual directory. Change the port no. to any other. Rebuild and run the application. It should resolve the issue.

Vocalise answered 21/3, 2024 at 10:21 Comment(0)
P
0

In my case, this problem was resolved by restarting the computer. But it is possible to solve it by restarting winnat, open cmd as administrator: net stop winnat net start winnat

Pachston answered 26/3, 2024 at 13:3 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.