Skip to content

Instantly share code, notes, and snippets.

@shirhatti
Last active April 27, 2016 21:19
Show Gist options
  • Save shirhatti/1ad6f9ec42c00bff6c02d5c79616f8c9 to your computer and use it in GitHub Desktop.
Save shirhatti/1ad6f9ec42c00bff6c02d5c79616f8c9 to your computer and use it in GitHub Desktop.
ANCM Error

ANCM Errors

Happy path

Event Logs

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module" />
    <EventID Qualifiers="0">1001</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-04-25T17:26:12.111097700Z" />
    <EventRecordID>294371</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SOSHIR_DESKTOP.redmond.corp.microsoft.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Process '508648' started successfully and is listening on port '1664'.</Data>
  </EventData>
</Event>

Stdout

dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3]
      Hosting starting
dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4]
      Hosting started
Hosting environment: Production
Content root path: C:\sites\DefaultAppPool\iissample_shared
Now listening on: http://localhost:1664/
Application started. Press Ctrl+C to shut down.

Shared Framework App

No dotnet.exe on path

Event Logs

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-04-25T17:32:20.477110600Z" />
    <EventRecordID>294372</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SOSHIR_DESKTOP.redmond.corp.microsoft.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Process '0' failed to start. Port = 2869, Error Code = '-2147024894'.</Data>
  </EventData>
</Event>

Stdout

Empty log file created

Browser

HTTP Error 502.3 - Bad Gateway

dotnet.exe exists. No shared framework available

Event Logs

Nothing in event logs

Stdout

Could not load host policy library from [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.0-rc2-24008]

This may be because the targeted framework ["Microsoft.NETCore.App": "1.0.0-rc2-24008"] was not found.

Browser

Request pending. I canceled the request after a minute.

Argument to dotnet.exe does not exist

Event Logs

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-04-25T19:37:28.264763100Z" />
    <EventRecordID>294418</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SOSHIR_DESKTOP.redmond.corp.microsoft.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Process '499796' failed to start. Port = 26995, Error Code = '-2147023829'.</Data>
  </EventData>
</Event>

Stdout

Could not load host policy library from [C:\sites\DefaultAppPool\iissample_shared]

Browser

Request pending. I canceled the request after a minute.

Standalone App

foo.exe does not exist

Event Logs

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-04-26T17:58:15.405231100Z" />
    <EventRecordID>295450</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SOSHIR_DESKTOP.redmond.corp.microsoft.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Process '0' failed to start. Port = 27949, Error Code = '-2147024894'.</Data>
  </EventData>
</Event>

Stdout

Empty log file created

Browser

HTTP Error 502.3 - Bad Gateway

processPath="IISSample_Standalone.exe"

processPath="IISSample_Standalone.exe" instead of processPath=".\IISSample_Standalone.exe"

Event Logs

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-04-26T18:06:38.944530900Z" />
    <EventRecordID>295608</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SOSHIR_DESKTOP.redmond.corp.microsoft.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Process '0' failed to start. Port = 20529, Error Code = '-2147024894'.</Data>
  </EventData>
</Event>

Stdout

Empty log file created

Browser

HTTP Error 502.3 - Bad Gateway

Other

Log folder doesn't exist

Event Logs

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module" />
    <EventID Qualifiers="0">1004</EventID>
    <Level>3</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-04-26T18:08:39.445885400Z" />
    <EventRecordID>295632</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SOSHIR_DESKTOP.redmond.corp.microsoft.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Warning: Could not create stdoutLogFile \\?\C:\sites\DefaultAppPool\iissample_standalone\logs\stdout_636032_201642618839.log, ErrorCode = -2147024893.</Data>
  </EventData>
</Event>
@shirhatti
Copy link
Author

shirhatti commented Apr 27, 2016

More scenarios by @Tratcher

  • No permissions to the shared framework directory
  • The application throws closes before opening the port (without CaptureStartupErrors).
  • The application closes a connection after accepting the request but before sending the response. E.g. Response.Abort().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment