Skip to content

Conversation

@jkotalik
Copy link
Contributor

@jkotalik jkotalik commented Sep 2, 2020

Fixes #24358

Example error message:

[aspnetcorev2_inprocess.dll] Event Log: 'Application '/LM/W3SVC/1/ROOT' with physical root 'C:\inetpub\wwwroot\' failed to load coreclr. Exception message:
Error occurred when initializing in-process application, Return code: 0x80008083, Error logs: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because 'C:\inetpub\wwwroot\SelfContainedIssueRepro.runtimeconfig.json' did not specify a framework.
  - If this should be a framework-dependent app, specify the appropriate framework in 'C:\inetpub\wwwroot\SelfContainedIssueRepro.runtimeconfig.json'.
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because 'C:\inetpub\wwwroot\SelfContainedIssueRepro.runtimeconfig.json' did not specify a framework.
  - If this should be a framework-dependent app, specify the appropriate framework in 'C:\inetpub\wwwroot\SelfContainedIssueRepro.runtimeconfig.json'.
' 
End Event Log 

@ghost ghost added the area-servers label Sep 2, 2020
@jkotalik jkotalik linked an issue Sep 2, 2020 that may be closed by this pull request
// Nested block is required here because FreeLibraryAndExitThread would prevent destructors from running
// so we need to do in in a nested scope
{
// We use forwarder here instead of context->m_errorWriter itself to be able to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the comment

m_stringRedirectionOutput
);

StandardStreamRedirection redirection(*redirectionOutput.get(), m_pHttpServer.IsCommandLineLaunch());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the StandardStreamRedirection up should be fine, it's now just called slightly earlier. No other methods modify the redirection.

ForwardingRedirectionOutput should also be fine, it still will be closed before StandardStreamRedirection.

@jkotalik
Copy link
Contributor Author

jkotalik commented Sep 2, 2020

@Pilchie can you merge this for rc2?

@Pilchie Pilchie merged commit d2c31ed into release/5.0-rc2 Sep 2, 2020
@Pilchie Pilchie deleted the jkotalik/improveLogsFromHostfxr branch September 2, 2020 22:54
@Pilchie Pilchie added the Servicing-approved Shiproom has approved the issue label Sep 2, 2020
@Pilchie
Copy link
Member

Pilchie commented Sep 2, 2020

Approved for .NET 5 RC2

@BrennanConroy BrennanConroy added this to the 5.0.0-rc2 milestone Sep 4, 2020
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unclear errors when running a self-contained app under IIS

5 participants