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 for Bug 13880 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 4594 [details]
Self hosted web api application
I created a simple WebAPI application (took code from http://www.piotrwalat.net/running-asp-net-web-api-services-under-linux-and-os-x/). Everything works just perfectly the problem comes when I try to make the application self hosted, for this I used HttpSelfHostServer.
On the first session of requests I get an answer from my application but any following requests are just ignored (and times out I believe). I can't see any high cpu/memory usage, it just seems to wait for something. The only solution for me is to restart the application, but restarting the application after each request isn't viable in the long run...
Also my version of Mono could be interesting I guess:
LLVM: supported, not enabled.
Any help is much appreciated, thank you :).
I can't give you help. But I have identical problem with Mono 3.2.3 on Windows, and with Mono 3.2.5 on Debian. x86_64 platforms.
SelfHosting aftet first GET request via http seems to rich deadlock.
Also I have open mono.exe in VS2012 to watch what about threads(real threads, not managed) - they wait for something.
Maybe in mono 3.2.6 it was been fixed....
Any comments, may be there is exist some stable TaskScheduler?
I have reached exactly the same behavior on Mono 3.2.8, amd64, Ubuntu 13.10.
The exakt same problem for me on Mac OS X / Xamarin Studio 4.3.4 / Mono 3.4.0 (I switched to the Alpha Channel because Mono 3.4.0 seems to include changes in the network stack, but that did not solve the issue).
Browser only gets a response for the first request, all additional requests keep pending and don't complete. CPU does not show anything, in Xamarin no threads are active and no events seem to be called after the first successful request.
This is a Xamarin blocker for me as I want to port a .Net web api application that required self hosting.
We need this too and I'm sad to see a major bug like this lingering for 8 months. I would be happy to sponsor a patch if someone wants to work on it.
I came across this issue while using Mono 3.2.8 that comes with Debian Jessie. It seems to be a version mismatch/incompatibility so you have a few options:
* Update to a newer version of mono
* Use the Debian provided assembly (/usr/lib/mono/gac/System.Web.Http.SelfHost/22.214.171.124__31bf3856ad364e35/System.Web.Http.SelfHost.dll) from https://packages.debian.org/stable/cli-mono/libmono-system-web-http-selfhost4.0-cil although this does not seem to work on Windows.
* Build a custom version of System.Web.Http.SelfHost against the updated dependencies which will work in both Windows and Linux based on https://github.com/mono/mono/tree/mono-3.2.8-branch or more specifically https://github.com/mono/aspnetwebstack/commits/e77b12e6cc5ed260a98447f609e887337e44e299 which is referenced by mono-3.2.8-branch.
I hope that helps anybody who still comes across this issue.
@Nick, thanks for answer. But instead it I think my solution will be in the following - I will never use Mono and/or C# at all from this point of my life!