NullReferenceException thrown by IISHttpContext.AbortIO in ASP.NET Core 3.0.1
See original GitHub issueDescribe the bug
From a weekly review of our production error logs, we noticed a single isolated example of the following exception from an ASP.NET Core 3.0.1 app running on Windows Server 2016 with IIS in-process hosting:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.AbortIO(Boolean clientDisconnect)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer.OnDisconnect(IntPtr pvManagedHttpContext)
To Reproduce
Unknown - presumably some edge-case when the client disconnects.
From looking at the code, I’d guess that somehow _bodyOutput
was null
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:46 (20 by maintainers)
Top Results From Across the Web
IISHttpServer OnDisconnect NullReferenceException
NET Core web application that is primarily based on executing Endpoints, I frequently get a NullReferenceException on the AbortIO call ...
Read more >System.NullReferenceException while trying to load a view
I am trying to load DataMgmt.cshtml view by clicking on a link from my _Layout page but the page which should be loaded...
Read more >Migrate from ASP.NET Core 2.2 to 3.0
This article explains how to update an existing ASP.NET Core 2.2 project to ASP.NET Core 3.0. It might be helpful to create a...
Read more >Issues with System.NullReferenceException occurrence ...
NET Core 3.1 is breaking when starting the web application because of a NullReferenceException, but this one is thrown in the IISHttpServer.
Read more >Friends Don't Let Friends Swallow NullReferenceException
If you are using ASP.NET MVC, Core or non-Core, chances are you are swallowing NullReferenceException without you even noticing.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am also facing this error quote often! My project is in .net core 3.1
Fixed via https://github.com/dotnet/aspnetcore/pull/22806