Azure / Azure/azure-functions-dotnet-worker
.NET 8 HttpContext is null when it is not in .NET 6
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
### Description
As per problem here: https://github.com/dotnet/aspnetcore/issues/53143
### Steps to reproduce
Project repo with .NET 8 and .NET 6 demonstration here:
https://github.com/MarkMilfordMe/AzureFunctionsHttpContextorIssue
If you run the .NET 8 project, with url: /api/Function1?ValueFromParameter=test it fails on Program.cs line 22
.NET 6 project runs fine, with url: /api/Function1?ValueFromParameter=test
I've tried to make the code as identical as possible
Issue is in .NET 8 it doesn't make IHttpContextAccessor.HttpContext available during dependency injection.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.