Closed wangchunlei closed 11 years ago
The .NET 3.5 client isn't supported anymore so I'm not sure what version of SignalR you're using. Did you set the proxy property on the client?
My version is cloned from the release at December 28 (2012). I donnot set proxy , I debuged the server(iis7.5),that can get the request,but no response.
Did you try looking at fiddler?
Yes,but fiddle cannot capture that.
I'm not sure what to tell you. Debug the source
I can use IE visit the url(/signalr/connect?transport=serverSentEvents&connectionId=z)
Request Count: 1 Bytes Sent: 696 (headers:696; body:0) Bytes Received: 446 (headers:326; body:120)
ClientConnected: 12:17:26.280 ClientBeginRequest: 12:17:34.579 GotRequestHeaders: 12:17:34.579 ClientDoneRequest: 12:17:34.579 Determine Gateway: 0ms DNS Lookup: 0ms TCP/IP Connect: 1ms HTTPS Handshake: 0ms ServerConnected: 12:17:34.579 FiddlerBeginRequest: 12:17:34.579 ServerGotRequest: 12:17:34.579 ServerBeginResponse: 12:19:43.024 GotResponseHeaders: 12:19:43.039 ServerDoneResponse: 12:19:43.039 ClientBeginResponse: 12:19:43.039 ClientDoneResponse: 12:19:43.039
Overall Elapsed: 0:02:08.460
~headers~: 326
text/event-stream: 120
The following are VERY rough estimates of download times when hitting servers based in WA, USA.
US West Coast (Modem - 6KB/sec) RTT: 0.10s Elapsed: 0.10s
Japan / Northern Europe (Modem) RTT: 0.15s Elapsed: 0.15s
China (Modem) RTT: 0.45s Elapsed: 0.45s
US West Coast (DSL - 30KB/sec) RTT: 0.10s Elapsed: 0.10s
Japan / Northern Europe (DSL) RTT: 0.15s Elapsed: 0.15s
China (DSL) RTT: 0.45s Elapsed: 0.45s
Learn more about HTTP performance at http://fiddler2.com/r/?HTTPPERF
This session is not yet complete. Press F5 to refresh when session is complete for updated statistics. Request Count: 1 Bytes Sent: 652 (headers:652; body:0) Bytes Received: 0 (headers:0; body:0)
The request isn't supposed to end that's how signalr works. Try debugging the source code.
Okey, url="/signalr/connect?transport=serverSentEvents&connectionId=..." HttpClient.GetAsync(url, req => { request = req; connection.PrepareRequest(request); request.Accept = "text/event-stream"; }).ContinueWith(task =>{}); the continuewith can never reach, until the timeout.
I don`t know which can cause that ,the client or the server?
The proxy might be buffering your responses. Try using the longpolling transport.
connection.Start(new LongPollingTransport());
O,I try it
Oh,it can connect when use LongPollingTransport,but after some seconds,the server call the disconnect....
You need to be a little more specific. I can't really help you out unless you give me more details.
I debug the server and client,found that after some seconds first the client received the 502 error then the transport.IsAlive is false. // foreach (var metadata in _connections.Values) { if (metadata.Connection.IsAlive) { CheckTimeoutAndKeepAlive(metadata); } else { Trace.TraceInformation(metadata.Connection.ConnectionId + " is dead");
// Check if we need to disconnect this connection
CheckDisconnect(metadata);
}
}
can I ignore this error and not set the alive to false?
I have no idea what you're doing. I'm closing this bug. Trying to do a live debug session on this bug isn't going to happen.
I used .net 3.5 Client,it works fine without proxy. But when I update the app.config to use global proxy, the connection.start(ServerSentEventsTransport).wait() pending. I debuged,found that the "/signalr/negotiate" can return connectionId, but the next request "/signalr/connect?transport=serverSentEvents&connectionId=XXX" pending until timeout .
I do not know how to resolve that.
Hope you can give me some suggestions,thanks.