Steps to Reproduce
Expected Behavior
Empty web application runs using Kestrel and IIS Express.
Actual Behavior
Build completes with no errors but web server does not start. Output displays following:
The program '[12780] dotnet.exe' has exited with code -2147450751 (0x80008081).
The program '[1996] iisexpress.exe' has exited with code 0 (0x0).
.NET Info
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
project.json
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
Does it start without the debugger (CTL+F5)?
Check event viewer.
Turn on stdoutLogEnabled web.config and make sure the stdoutLogFile directory exists.
I tried without debugging and the process still failed. Browser showed a "502.5 - Process Failure" HTTP error. I checked the event log after this and had 4 identical errors:
Failed to start process with commandline '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe" -p "C:\Program Files\dotnet\dotnet.exe" -a "C:\Users\sxp13\Personal\Development\Projects\Test\src\Test\bin\Debug\netcoreapp1.0\Test.dll" -wd "C:\Users\sxp13\Personal\Development\Projects\Test\src\Test" -wbe Global\Buildb7eaafe3-b932-4471-a468-6e88b471ebd0 -lse Global\Launch4f253d55-d841-4a99-9017-723954d5e419', ErrorCode = '0x80004005'.
I've gotten this a few times in the last couple days, and fixed it both times by:
Last time I had removed the following sections:
I had the same errors as well, but I'm not using IIS in any way, just Kestrel.
Details I noticed:
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14915
OS Platform: Windows
RID: win10-x64
I started getting this same problem this afternoon. Any progress on a solution or work around?
@jamesabolton - our infrastructure has us rename our projects, and my problem went away.
We had dashes in our project names, and this bug seems to have had a similar issue:
https://github.com/aspnet/Tooling/issues/736
@jamesabolton I was getting the same error in a project that had dashes in the name. Thanks to @ChadJessup comment, I recreated the project with a new name (without dashes) and the error did not occur.
Started to have this exact problem after upgrading my project's NetCore.Platform from 1.0.0 to 1.0.1.
My project name doesn't have any dashes, so in my case this isn't the problem as pointed out by @ChadJessup
Been fighting with it a couple of hours without any success.
I started to have this same problem this morning after I changed my frameworks from netcorapp1.0 to netcoreapp1.1.
I reverted it, built and it launched in debug, then I switched it back and did the same and my problem went away. Very strange.
I've had the same issue, and it turned out that I simply didn't have the right version of the runtime (1.1.0); instead I was trying to use 1.1.0 assemblies with 1.0.1 runtime.
The resolution is simple - download and install SDK from here, but pick the right version! It turned out that if you want version 1.1.0 you should select "Current" option (button).
Basically the problem is caused by stupid interface at the referenced page - if you don't pay attention you'll download v1.0.1 since it is "LTS" version, and "LTS" option is default there. What to say... Yet another disappointment from .NET team in this crazy-versioning, crazy-moniker, crazy-platform times...
@peske That resoled the issue for me
Can't say any of these suggestions fixes the problem for me... quite frustrating.
I agree with @peske, the experience of moving to .NET Core has been hell. Every upgrade, something breaks. My 2015 tools were never stable, I'm on 2017 RC now, but they have a whole bunch of new issues, and getting this issue whenever i try to launch my project in 2017.
@peske installing the current runtime worked for me. Thanks for the suggestion, was driving me crazy :)
@peske Brilliant! Fixed the issue for me.
Worked for me, thanks @peske!
@peske Amazing that the very valid issue you pointed out 4 months ago re the confusing link still has not been fixed. In any case, VS2017 aspnet core web projects are also still broken ( failing to start ) and that has been for months now as well. Even the basics don't work with VS2017.
I encountered this issue today as wel and it was doing my head in. In production (i,e. without the ASPNETCORE_ENVIRONMENT
envvar set to Development
) my app would crash before even starting, i.e. not really a chance to debug.
The issue more than likely was not going to be in the dotnet runtime, seeing as it would only error out while running MY code in production.
So I tried running the command that is in the web.config's aspnetCore element from the command line:
<aspNetCore processPath="dotnet" arguments=".\Assembly.dll"
as dotnet Assembly.dll
from within the site's root older as it showed up in Azure.
And lo and behold, an error,
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
Turns out the issue was to do with the DI pipeline of Configure(Services) and in my case, a wrngly configured path to an IdentityServer4 signing cert.
The issue was so difficult to find because to to the static nature of the DI process the error was spit out even before it hit actual program I guess,
@peske Thank you! Solved my problem.
@peske Thank you! You saved me
@peske Thank you so much. I was trying to find the solution for the last 4 days and finally, your answer helped me.
@peske Thank you!
I had similar symptoms to what @peske's well upvoted answer was, but it was related to the move from {{netcoreapp2.2}} to {{netcoreapp3.0}}. We had a functioning app which could run and build from the IDE, which could no longer have the app run directly from the IDE.
The project has an x86 native dependency, and because of this we would always use the .NET Core x86 based SDKs. With Visual Studio 16.3+, the choice was removed since it is now part of the Visual Studio Installer workflow options. Even though I had the .NET Core x86 SDK first on PATH, that no longer mattered to Visual Studio.
In my case, the fix was specifying a {{
Most helpful comment
I've had the same issue, and it turned out that I simply didn't have the right version of the runtime (1.1.0); instead I was trying to use 1.1.0 assemblies with 1.0.1 runtime.
The resolution is simple - download and install SDK from here, but pick the right version! It turned out that if you want version 1.1.0 you should select "Current" option (button).
Basically the problem is caused by stupid interface at the referenced page - if you don't pay attention you'll download v1.0.1 since it is "LTS" version, and "LTS" option is default there. What to say... Yet another disappointment from .NET team in this crazy-versioning, crazy-moniker, crazy-platform times...