Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null reference exception when ASP .NET Core application is deployed to IIS #59547

Open
1 task done
geetyoscar opened this issue Dec 18, 2024 · 0 comments
Open
1 task done
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@geetyoscar
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Dec 18, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant