A note on the SignalR connection count issue

Non-server versions of windows have 10 inbound limit

 I encountered a problem when using the SignalR project test. The development environment uses the Win10 operating system. When running the project in the VS2017 debugging environment, it is no problem to connect multiple SignalR clients. For example, three users are in a chat room. Chat at the same time. However, when it is published to IIS for testing, only two users can be connected, and the third page has been in a waiting state after opening. I remember that SignalR can be used on Windows 7, so I thought that Windows 10 should be no problem at first. I checked a lot of information about the limit of the number of connections, and finally I went to the official website of SignalR, https://docs.microsoft.com /en-us/aspnet/signalr/overview/getting-started/supported-platforms , said very clearly, Supported server operating systems:

  • Windows Server 2012
  • Windows Server 2008 r2
  • Windows 8
  • Windows 7
  • Windows Azure

  In fact, there is also the problem of WebSocket environment support. IIS8+&Windows Server 2012 only supports WebSocket. If this is the case, then the chat room running under Windows 2008 R2 I currently deploy should not use the WebSocket protocol.



Recently, I was working on a web project. SignalR2.0 was used because of the need to realize two-way communication between the client and the server. The operating environment of the site is Win7 server, IIS7, but I encountered a problem, that is, when the number of client connections reaches 10 After that, the following users can't connect all the time; after consulting relevant information, it is found that this problem generally exists, and there are two ways to solve this problem:

1. Publishing the site to the Win 2008 Server R2 server will not have the problem of connection limit

 

2. There is no limit on the number of connections if the site is published through IIS Express (running through F5 in VS also runs on IIS Express)

   IIS Express deployment plan:

   1. Install IIS Express
   2. Open C:\Users\hua.li\Documents\IISExpress\config\applicationhost.config file, add site (the site to be published)
   3. Run C:\Program Files\IIS Express\iisexpress. exe
   4, you can access the site

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325987489&siteId=291194637