System.NullReferenceException at Microsoft.AspNetCore.Http.DefaultHttpRequest.get_HasFormContentType()
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Describe the bug
Sometime I got the error System.NullReferenceException
at Microsoft.AspNetCore.Http.DefaultHttpRequest.get_HasFormContentType()
for several GET API.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
Error: Object reference not set to an instance of an object.System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.Http.DefaultHttpRequest.get_HasFormContentType()
at Microsoft.AspNetCore.Mvc.ModelBinding.FormValueProviderFactory.CreateValueProviderAsync(ValueProviderFactoryContext context)
at Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider.CreateAsync(ActionContext actionContext, IList`1 factories)
at Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider.TryCreateAsync(ActionContext actionContext, IList`1 factories)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
.NET Version
6.0.202
Anything else?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Random NullReferenceException on Asp.Net Core 2.1.1 ...
System.NullReferenceException: at Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest.get_Query (Microsoft.AspNetCore.
Read more >System.NullReferenceException: 'Object reference not set ...
Can someone please have a look at my code and help me understand why I'm getting this error? I have set up a...
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 >How can I fix the error: System.NullReferenceException
How can I fix the error: System.NullReferenceException: 'Object reference not set to an instance of an object.'.
Read more >Why am I getting a null reference exception for ASP.NET ...
Model Binding Null exception a View Component in Razor Pages Framework : ASP.Net Core 3.1. Razor page. 1) AppView Page -> ApplicantsView.
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
OK here’s the deal:
Read the other issue and see what the issue was and what the fix was. That will help you narrow your code down to what parts of your code might be a problem. It could be logger, direct usage of the telemetry client or indirect usage.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.