Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: HttpSelfHostServer and long polling issue [284]

$
0
0
When using a long polling technology offered by SignalR in a application that uses WebApi hosted by HttpSelfHostServer makes a crush of HttpSelfHostServer. It seems to me that is rather HttpSelfHostServer issue than SignalR because the same application hosted by IIS or Cassini works fine but if you guys say that a problem is SignalR implementation I will ping SignalR team about that. In order to play with SignalR+WebApi I used: https://github.com/youssefm/SignalR/tree/webapi to create an appropriate infrastructure. I'm attaching a sample application that illustrates an issue. Steps to reproduce:

1) Run SelfHostServer.exe
2) Run Client.exe
3) Run Client.exe
4) GET http://localhost:56433/test // it will force to connect and establish long polling connection
5) Kill one of the Client.exe
6) GET http://localhost:56433/test // it will cause the crush with the following exception:

System.Runtime.CallbackException: An AsyncCallback threw an exception. --->
System.ServiceModel.CommunicationException:
An operation was attempted on a nonexistent network connection. ---> System.Net
.HttpListenerException: An operation was attempted on a nonexistent network connection.
at System.Net.HttpResponseStream.BeginWrite(Byte[] buffer, Int32 offset, Int32
size, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.Listener
ResponseOutputStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncC
allback callback, Object state)
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.Listener
ResponseOutputStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncC
allback callback, Object state)
at System.ServiceModel.Channels.BufferedOutputAsyncStream.ByteBuffer.Flush()
at System.ServiceModel.Channels.BufferedOutputAsyncStream.Close()
at System.ServiceModel.Channels.HttpOutput.Close()
at System.ServiceModel.Channels.HttpRequestContext.ListenerHttpContext.OnClose
(TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Close(TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Close()
at System.Web.Http.SelfHost.Channels.HttpMessageEncodingRequestContext.Close()

at System.Web.Http.SelfHost.HttpSelfHostServer.ReplyContext.Dispose(Boolean di
sposing)
at System.Web.Http.SelfHost.HttpSelfHostServer.ReplyComplete(IAsyncResult resu
lt)
at System.Web.Http.SelfHost.HttpSelfHostServer.OnReplyComplete(IAsyncResult re
sult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously, Excepti
on exception)
at System.ServiceModel.Channels.HttpRequestContext.ReplyAsyncResult.OnSendResp
onseCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously, Excepti
on exception)
at System.ServiceModel.Channels.HttpOutput.SendAsyncResult.OnWriteStreamedMess
age(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 erro
rCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, U
Int32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 e
rrorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Comments: Fixed: http://aspnetwebstack.codeplex.com/SourceControl/changeset/d42ce817ca3e

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>