c# - hubConnection.Start taking really long -


i want use signalr in windowsservice , have clients on other machines console/wpf apps. signalr selfhosted/owin.

it working client @ localhost. if try connect on ip address or dns-name connection needs 4 minutes connected.

there problem hubconnection.start not returning 4 minutes. turned tracing on already. here screenshot of tracing:

client connecting trace

as can see takes 4 min. have same problem in release build configuration , run vs2015 administrator on win 7 pro x64 machine, firewall turned off.

i can reproduce problem example solution http://www.codeproject.com/articles/804770/implementing-signalr-in-desktop-applications , change clients connection url localhost ip address. different ports have same behaviour

after long 4min connection time working without long delays. tried signalr 2.0.3, 2.1.1 , 2.2.1.

i embedded signalr 2.1.1 sourcecode , analysed issue in signalr.client sources.

at line debugger not return 4 minutes:

            return task.factory.fromasync<httpwebresponse>(request.begingetresponse, ar => (httpwebresponse)request.endgetresponse(ar), null); 

in method public static task gethttpresponseasync(this httpwebrequest request) in httphelper.cs

update: pawel suggested in comments tried fiddler analyse problem. there no entries server or client. didn't change after 4minutes. working communication after 4 minutes invisible fiddler. maybe because fallback localhost connection , can't seen fiddler?

but strange thing is, if start client normal user instead of administrator client gets connected (fast) , in fiddler looks fine , can see communication happening there too.

somehow working now. know wrong starting client administrator?


Comments