Null reference exception when ASP .NET Core application is deployed to IIS #59547
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Is there an existing issue for this?
Describe the bug
We have a .NET Core web application that was compiled to run in the .NET 8.0 Framework.
I have tested the deployment on our test server and it seems to be running as expected.
However, there is one server where I keep getting the following exception.
Unexpected exception in IISHttpServer.OnAsyncCompletion.
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.Server.IIS.Core.IO.AsyncIOEngine.NotifyCompletion(Int32 hr, Int32 bytes)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer.OnAsyncCompletion(IntPtr pvManagedHttpContext, Int32 hr, Int32 bytes)
This is happening at one of my client's servers. This happens when the application is deployed using IIS. This does not happen when running the application in a self-hosted Kestrel server.
I was not able to replicate this in my local environment so I do not know how to debug this issue.
We are using Telerik Kendo components.
I ran into a thread with this same exact problem and it was mentioned that is because of a configuration problem. The thread was locked and I cannot see the solution that they implemented.
I was hoping anyone of you may have encountered a similar issue and please let me know how were you able to resolve this.
Thank you very much.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
Event Viewer errors
Category: Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer
EventId: 0
SpanId: ba968959c82f0c99
TraceId: 06e9e3bf3d8be5605af6617c295938a6
ParentId: 0000000000000000
RequestId: 400035a1-0000-f700-b63f-84710c7967bb
RequestPath: /Dashboard/css/variables5.scss
Unexpected exception in IISHttpServer.OnAsyncCompletion.
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.Server.IIS.Core.IO.AsyncIOEngine.NotifyCompletion(Int32 hr, Int32 bytes)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer.OnAsyncCompletion(IntPtr pvManagedHttpContext, Int32 hr, Int32 bytes)
====================
Category: Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer
EventId: 0
SpanId: ce26d078a71a871e
TraceId: bb7c7d5b685f1c5bcdd5b885535e1d43
ParentId: 0000000000000000
RequestId: 4000019a-0001-f500-b63f-84710c7967bb
RequestPath: /Dashboard
ActionId: e2d772f6-e296-4283-8d55-1c0847263afd
ActionName: SEACSDashboard.Controllers.HomeController.Index (SEACSDashboard)
Unexpected exception in IISHttpServer.OnAsyncCompletion.
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.Server.IIS.Core.IO.AsyncIOEngine.NotifyCompletion(Int32 hr, Int32 bytes)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer.OnAsyncCompletion(IntPtr pvManagedHttpContext, Int32 hr, Int32 bytes)
.NET Version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: