.NET Core app unable to start in IIS due to ErrorCode = '0x80004005 : 80008083

78,951

Solution 1

As VS2017 RC is shipped with the new version of .NET Core SDK (.NET Core 1.0.4 SDK 1.0.1), you need to update framework on server as well.

Solution 2

For now, there is a simple way to see what the actual error is. Open Console section from the App service, then try to run the dotnet app. From there we may get the full error message and trace info: enter image description here

Solution 3

Error code: 0x80004005 means a file missing or can't be accessed.

Sub-code: 80008083 appears to be a version conflict.

This error means a different version of dotnet needs to be installed on the server.

Solution 4

A possible solution that worked for me is that I added this to my publish profile in Visual Studio:

<PublishWithAspNetCoreTargetManifest>False</PublishWithAspNetCoreTargetManifest>

I believe this will make the host use the required files to run the app instead of relying on specifications set in a target manifest which could be wrong (either the runtime/sdk on server or your local is in conflict with these specifications).

Solution 5

I had published a new .NET Core 2.0 web app to Azure App Service and hit this error.

Hitting the site:

HTTP Error 502.5 - Process Failure Common causes of this issue: The application process failed to start The application process started but then stopped The application process started but failed to listen on the configured port

Debugging: Using Azure Application Insights & the App Service - Advanced Tools (KUDU) looking at the Tools - Debug Console - Browsing the LogFiles folder eventlog.xml had a log row:

Application 'MACHINE/WEBROOT/APPHOST/xxxx' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline 'dotnet .\WebApp.dll', ErrorCode = '0x80004005 : 8000808c.

<Provider Name="IIS AspNetCore Module"/>
<EventID>1000</EventID>
<Level>1</Level>
<Task>0</Task>
<EventData>
<Data>Application 'MACHINE/WEBROOT/APPHOST/xxxx' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline 'dotnet .\WebApp.dll', ErrorCode = '0x80004005 : 8000808c.</Data>
</EventData>
</Event>

Solution

This answer: Deleting the wwwroot folder in azure and publish again from VS, worked for me despite not having a legacy Core 1.1 app initially.

Launch Azure Console within the app and delete the contents of the wwwroot folder then redeploy.

RMDIR wwwroot /S /Q

Further testing Following this was very helpful for testing and it works when followed identically, then deviate however you need to find errors. https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-azure-webapp-using-vs

Share:
78,951
Keith
Author by

Keith

Keith Henry Chief Software Architect, building offline-first and responsive applications in the recruitment industry. I'm also on Linked In. Email me on Google's email, my address is ForenameSurname.

Updated on December 10, 2021

Comments

  • Keith
    Keith over 2 years

    I have a .NET Core application. It runs locally with VS2017 and Kestrel. It runs locally under IIS. However, on the server it fails to start with a 502.5 - Process Failure message.

    In the event logs I get more detail:

    Application '...' with physical root 'C:...\my-app-folder\' failed to start process with commandline '"dotnet" .\MyApp.dll', ErrorCode = '0x80004005 : 80008083.

    Previous builds of the application work fine on the same server, the only difference being that they were published with VS2017RC (2&3) and this is the first build with the fully released VS2017.

    What does ErrorCode = '0x80004005 : 80008083. mean?

    How do I fix it?

  • Agat
    Agat about 7 years
    Actually I've got that issue as well. And this sounds very weird. I've previously had a project built with VS 2015 and setup Core SDK v1.1.1 on the server previously. And now, when migrated to VS 2017 with the new built project had the error and had to install v1.0.4 what's pretty silly. Why does it happen? Not sure I am following what's happening...
  • FunkyPeanut
    FunkyPeanut over 6 years
    Where can I find a reference for those errors? I have ErrorCode = '0x80004005 : e0434352. Thanks!
  • Keith
    Keith over 6 years
    @FunkyPeanut I'm afraid I don't know - I didn't find a reference for any of them, just other posts talking about the specific version conflict I had.
  • FunkyPeanut
    FunkyPeanut over 6 years
    Unfortunate - thanks for your fast reply! I was able to resolve my issue by manually invoking dotnet on the Azure WebApp using Kudu. I found out a dll was making problems and after decompiling the assembly with ildasm it turned out it got corrupted somehow. So I just manually built and replaced the library and it worked... weird stuff!
  • Francis
    Francis over 6 years
    I am trying to get a ASP.NET Core 1.1 Site up and running on a Windows Server 2012 and came through this error. I had to install .NET Core run time 1.1.2 to overcome this error. I don't recall any 1.1.2 references in my project and during testing on local virtual machines installing 1.1.1 runtime was fine. This is where I got 1.1.2 runtime from : github.com/dotnet/core/blob/master/release-notes/…
  • Keith
    Keith about 6 years
    Cheers, but it wasn't getting as far as giving me a stack trace - it falling over before even getting into managed code.
  • neilsimp1
    neilsimp1 about 6 years
    I was getting ErrorCode = '0x80004005 80008083 and deleting wwwroot and redeploying the project fixed it for me. Thank you!
  • Mikolaj Kieres
    Mikolaj Kieres about 6 years
    Yep, I had some old stuff in the wwwroot, which was not being cleared with the new deploy. Removing the folder and re-deploying worked like a charm
  • David van Dugteren
    David van Dugteren about 6 years
    What is this 'app service' you speak of and where do I find it?
  • NeilMacMullen
    NeilMacMullen almost 6 years
    I had this issue which I think occurred when a new version of .netstandard was released and I upgraded my webapi to it before redeploying. The easy 'fix' was then to change the deployment mode to "self-contained" (In the Visual Studio, publish page, choose "Configure" then "Settings" on the Publish dialog and set "Deployment mode" to "Self contained"
  • Jack Rus
    Jack Rus almost 6 years
    This answer should be accepted as a correct one. Doesn't require to update anything on the server side. Thx.
  • Keith
    Keith almost 6 years
    @JackRus maybe, I'll have to test it across a version upgrade first - if it works I'll accept it as the answer.
  • sebagomez
    sebagomez almost 6 years
    this is the best way to get a nice/understandable error message! +1
  • DKMudrechenko
    DKMudrechenko almost 6 years
    Thanks, helped me as well. Will be looking for a solution that doesn't depend on my dev environment.
  • IEnjoyEatingVegetables
    IEnjoyEatingVegetables over 5 years
    Broken image! could you fix it?
  • IEnjoyEatingVegetables
    IEnjoyEatingVegetables over 5 years
    I'm getting the same error code but deploying via Windows Server 2012
  • Andy G
    Andy G over 5 years
    In the Publish profile configuration I changed the Target Runtime from Portable to win-x64 to resolve this problem. This ends up with an .exe rather than the web.config pointing at the .dll.
  • James Gould
    James Gould over 5 years
    Fixed it for me perfectly, clean -> rebuild -> dotnet ./proj/.../bin/debug/MyDll.dll and it printed everything I needed to know. I got to this thread from looking on my Kudu Diagnostic console via Azure, Diagnostic Console -> LogFiles/eventlog.xml and the error message was right at the bottom.
  • Roger D.
    Roger D. about 5 years
    OK, I got this error again and this time all I needed to do was to remove the following from the .csproj file: <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.8" />
  • Markus
    Markus almost 5 years
    The seems applicable only for Azure App Service