10

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/.
Devloop80
  • 193
  • 1
  • 2
  • 11
  • Code 0 means "no error". What exactly is the problem here? Please describe with more details. – Lex Li May 27 '19 at 18:46
  • Added some more information, @LexLi – Devloop80 May 27 '19 at 18:53
  • You'd better run a project diagnostics report and attach it as part of question, https://docs.jexusmanager.com/tutorials/vs-diagnostics.html It is impossible to talk about such with key information like that. – Lex Li May 27 '19 at 18:56
  • @LexLi, I have added the diagnostics. But it does not mean much to me. – Devloop80 May 28 '19 at 16:57
  • 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, https://developercommunity.visualstudio.com/spaces/8/index.html – Lex Li May 28 '19 at 17:38
  • 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. – Hans Passant May 28 '19 at 17:55
  • It is nothing wrong with my hostfile. Just checked it. – Devloop80 May 28 '19 at 18:04
  • @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) – Fabio Scagliola Dec 05 '21 at 11:07

12 Answers12

12

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

Ivan Aracki
  • 4,861
  • 11
  • 59
  • 73
user14451183
  • 121
  • 1
  • 3
3

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

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.

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.

Gene Z. Ragan
  • 2,643
  • 2
  • 31
  • 41
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.

Wladigley
  • 1
  • 1
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.

Felipe Thomé
  • 353
  • 3
  • 12
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.

0

My problem was solved by restarting the computer.

or

You can try by the remove your temp data.

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.

isherwood
  • 58,414
  • 16
  • 114
  • 157
dzydodd
  • 1
  • 1
0

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

enter image description here

Josip P
  • 1
  • 2
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

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.