Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 6172 [details]
Launches a self-hosted WebAPI in OWIN that throws on every request
This is a follow-up bug to bug 17965. After patching in support for an anonymous user into the Microsoft.Owin.Host.HttpListener I reproducibly get a NullReferenceException for every HTTP request when calling DelegatingHandler.InnerHandler.SendAsync.
As with case 17965, as soon as I unplug WebAPI from the OWIN pipeline, everything works correctly.
Find attached a program to reproduce this issue. The program serves to URIs:
http://localhost:12345/ -> handled by Nancy. Works when WebAPI is not plugged into the pipeline
http://localhost:12345/api/some -> handled by WebAPI
The Microsoft.Owin.Host.HttpListener included is a private build with the workaround for bug 17965 included.
I revisited this on a custom build of mono from master/a8f3f77 under Ubuntu 14.04 and could no longer reproduce what I saw in the windows build. Since I'm aiming for linux and as-recent-as-possible mono, it works for me.