Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 23, 2025

Backport of #63773 to release/10.0

/cc @adityamandaleeka

Load handler DLL with load dir on the path

Description

This change updates the handler DLL load call from LoadLibrary to LoadLibraryEx with the flags
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR

The handler DLL exports CreateApplication as a forwarded export to an architecture-specific DLL. The plain LoadLibrary does not search the handler’s directory when resolving that forwarder. As a result, the loader fails to locate the arch-specific DLL and the scenario breaks (the user gets a 500 error).

Fixes #63772

Customer Impact

Apps may fail to start because the arch-specific implementation for the forwarded export isn't found.

Regression?

  • Yes
  • No

This bug was introduced in .NET 10 Preview 2 as part of #59483

Risk

  • High
  • Medium
  • Low

Localized change to one load site. Only adds the handler's directory to the probing path for that module's dependency resolution and does not enable PATH/CWD, nor change process-wide state.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@adityamandaleeka adityamandaleeka added the Servicing-consider Shiproom approval is required for the issue label Sep 23, 2025
@wtgodbe
Copy link
Member

wtgodbe commented Sep 24, 2025

@adityamandaleeka is this for RC2 or RTM?

@danmoseley
Copy link
Member

@wtgodbe it is for RC2 if possible (see Jeff's tactics mail about speculative changes).

Given the change is so localized, my inclination would be to get it into RC2 if we're allowed to today, even though vendor validation didn't yet happen.

@danmoseley
Copy link
Member

Mechanistically should we kick the bot to make an rc2 port, or do you do that?

@wtgodbe
Copy link
Member

wtgodbe commented Sep 24, 2025

/backport to release/10.0-rc2

Copy link
Contributor Author

Started backporting to release/10.0-rc2: https://github.com/dotnet/aspnetcore/actions/runs/17981742507

@wtgodbe
Copy link
Member

wtgodbe commented Sep 24, 2025

Given the change is so localized, my inclination would be to get it into RC2 if we're allowed to today, even though vendor validation didn't yet happen.

Sounds good, I just kicked the bot. Since this is already green we might as well merge it too

@wtgodbe wtgodbe merged commit 60477d3 into release/10.0 Sep 24, 2025
28 checks passed
@wtgodbe wtgodbe deleted the backport/pr-63773-to-release/10.0 branch September 24, 2025 15:33
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0.0 milestone Sep 24, 2025
@wtgodbe wtgodbe added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Sep 24, 2025
Copy link
Contributor

Hi @@github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

wtgodbe added a commit that referenced this pull request Sep 24, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aditya Mandaleeka <adityam@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants