I have an API application and a web application (for simplicity on the same server - I will do CORS stuff later).
- Windows Server 2012 with IIS 8.5
- Web Sites Installed Through Programs and Features
- Firewall is off
Api uses owin + signalr and has the correct initialization (truncates it to find the error):
public void Configuration(IAppBuilder app) { GlobalHost.Configuration.TransportConnectTimeout = TimeSpan.FromSeconds(5); app.MapSignalR(); app.UseWebApi(Startup.CreateConfiguration()); } private static HttpConfiguration CreateConfiguration() { HttpConfiguration configuration = new HttpConfiguration(); configuration.MapHttpAttributeRoutes(); return configuration; }
Everything seems to work just fine, except for connecting to actual websites. Each time the client tries to establish a connection, a timeout occurs and it switches to SSE (or forever frame / long polling in IE). I increased the timeout to 25 seconds, and the same symptoms appear.
On the client, I sequentially get this error with the protocol enabled:
SignalR: Connecting to websocket endpoint 'ws://[myurl]'. SignalR: Websocket opened. SignalR: **webSockets timed out when trying to connect.** SignalR: Closing the Websocket. SignalR: Attempting to connect to SSE endpoint 'http://[myurl]'. SignalR: EventSource connected. SignalR: serverSentEvents transport selected. Initiating start request. SignalR: The start request succeeded. Transitioning to the connected state.
I tried following the instructions provided by the signalR command, and I don't see what is missing.
Thanks for any help!
UPDATE: I downloaded the sample and ran it as is on the server. In the same situation, so this is probably the server configuration setting that I skipped along the way. I still haven't found what I missed.
source share