You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
I'm using NancyHost for self hosting. But whenever I try to Stop or Dispose the host, I get these two exceptions:
mscorlib: Cannot access a disposed object.
Object name: 'listener'.
at System.Net.ListenerAsyncResult.GetContext () [0x0001c] in <748af814b14a45f7803e4fe5c9300d51>:0
at System.Net.HttpListener.EndGetContext (System.IAsyncResult asyncResult) [0x00099] in <748af814b14a45f7803e4fe5c9300d51>:0
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <52405d1838e24bc5b300f5ebeee9f7c4>:0
--- End of stack trace from previous location where exception was thrown ---
at Nancy.Hosting.Self.NancyHost+<>c__DisplayClass14_0.<Start>b__1 (System.Threading.Tasks.Task`1[TResult] contextTask) [0x00087] in <5e6fd4328ff54d50a87c10c9ee6cd54a>:0
mscorlib: Cannot access a disposed object.
Object name: 'listener'.
at System.Net.ListenerAsyncResult.GetContext () [0x0001c] in <748af814b14a45f7803e4fe5c9300d51>:0
at System.Net.HttpListener.EndGetContext (System.IAsyncResult asyncResult) [0x00099] in <748af814b14a45f7803e4fe5c9300d51>:0
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in <52405d1838e24bc5b300f5ebeee9f7c4>:0
--- End of stack trace from previous location where exception was thrown ---
at Nancy.Hosting.Self.NancyHost+<>c__DisplayClass14_0.<Start>b__1 (System.Threading.Tasks.Task`1[TResult] contextTask) [0x00087] in <5e6fd4328ff54d50a87c10c9ee6cd54a>:0
Steps to Reproduce
The host function does this:
Task.Run(()=>{_host=new NancyHost(new HostConfiguration{UnhandledExceptionCallback=ExceptionHandler},new Uri($"http://localhost:{port}"),new Uri($"http://127.0.0.1:{port}")); _host.Start(); EmitSignal(nameof(OnStart));// to notify the rest of code});
System Configuration
Nancy version: v2.0.0
Nancy host
Nancy.Hosting.Self
Environment (Operating system, version and so on): Windows 10 x64
.NET Framework version: .NetFramework 4.5.2 mono
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
I'm using NancyHost for self hosting. But whenever I try to
Stop
orDispose
the host, I get these two exceptions:Steps to Reproduce
The host function does this:
System Configuration
The text was updated successfully, but these errors were encountered: