Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Warning causing OPTIONS request to return as 502 #782

Closed
@severisv

Description

@severisv

After upgrading from RC1 to RC2 our OPTIONS-requests (used for CORS) return 502 instead of 204, causing them not to work.

As it turns out, this is caused by a NullReferenceException at AspNetCore.Hosting.Internal.HostingApplication.DisposeContext().

The warning occours at every request, but requests returned by the MVC-pipeline return with the correct status code, while the requests that do not hit any route in the MVC-pipeline or are returned by the CORS-middleware return as 502. The IIS-logs tell us it is a 502.3 occuring in the AspNetCore-module.

Adding app.UseDatabaseErrorPage() causes the warning to disappear and everything to work correctly, but this is obvously not a viable solution for a production environment.

Here is a gist of our project.json

stdout log:

WARN   2210ms [12               ] Token=adb9793829ddae60 Log                - Connection processing ended abnormally Message: 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.Hosting.Internal.HostingApplication.DisposeContext(Context context, Exception exception)
   at Microsoft.AspNetCore.Server.Kestrel.Http.Frame`1.<RequestProcessingAsync>d__2.MoveNext()

IIS-trace: https://drive.google.com/folderview?id=0B7YqWm3lf4vZMmNvdFpKZ2lxNGc&usp=sharing

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions