问题
SignalR has a nice example for using a Persistent Connection which works just fine when I use IIS Express. It fails when I use the same on the regular IIS that is installed on my Windows 7 system. And it fails silently too, except for the Chrome console telling me: "Failed to load resource: the server responded with a status of 404 (Not Found) ".
It is looking for http*:*//localhost:80/echo/negotiate?_=1371821713975
which it can't find for whatever reason. And to make it even more complex: after deploying this example project to my Windows 2012 server, it works just fine!
So, my Windows 7 system must have some flaw somewhere... Does anyone have any suggestions about where I can look for a solution? How to fix this?
(I am not going to use the SystemR hub, nor do I use MVC. Just a plain old web application, exactly as the example.)
Update: After some experiments I discovered that it doesn't seem to work on IIS 7 but it does work on IIS 8.
回答1:
Are you by chance specifying web sockets as the transport explicitly rather than letting it auto-negotiate? If so, only IIS8 has web socket support and that's why it would work on Windows Server 2012, but not IIS 7.5 on Windows 7.
回答2:
You shouldn't be using full IIS on a client OS like Windows 7- there's a 10-connection limit that you're probably hitting. See "Connection limit reached" in this doc:
http://www.asp.net/signalr/overview/troubleshooting-and-debugging/troubleshooting
来源:https://stackoverflow.com/questions/17237037/signalr-fails-on-iis