monotorrent
monotorrent copied to clipboard
HTTP listener in TrackerSample doesn't work / Can't use 0.0.0.0 to listen for HTTP requests
In latest master branch, System.Net.HttpListenerException: 'The request is not supported.'
is thrown when trying to start the HTTP listener.
Cause: https://github.com/prometheus-net/prometheus-net/issues/62
Changing this line https://github.com/alanmcgovern/monotorrent/blob/master/src/Samples/TrackerApp/Main.cs#L97 to TrackerListenerFactory.CreateHttp ("http://*:10000/announce/")
, removing httpEndpoint
above, and running the app as administrator finally makes it work.
thanks,it is normal operation
It is frustrating, but it's 'by design' on windows.
https://stackoverflow.com/questions/2583347/c-sharp-httplistener-without-using-netsh-to-register-a-uri
That shows how to properly set up httplistener to allow incoming questions.
The sample works out of the box now - without needing special OS level configuration - and also links to stackoverflow because why not ;)
https://github.com/alanmcgovern/monotorrent/commit/f5ab102b60ef6c41348ad9c75c47e60e1a71dc0b#diff-3f074defcc88c39af635e4605274d9799623b5e3eea66eca586971b5e0bb547cR185-R186