WCF Max Instances seems to be limited to 10

后端 未结 3 964
暖寄归人
暖寄归人 2020-12-30 06:27

I have a simple WCF service hosted in IIS7.5 exposed over a wsHttp binding using message security and InstanceContextMode.PerCall

I have a simple UI that spins up a

相关标签:
3条回答
  • 2020-12-30 06:36

    The MaxConcurrentSessions documentation mentions an optimization for client requests that come from the same AppDomain. Your sample code is basically hitting the same socket on the service. Since there is some throttling done per client, that may be affecting your service behavior. Also, 10 happens to be the default value for MaxConcurrentSessions so it may be that your config is not changing the WCF default value.

    Enabling security affects the total threads because it establishes a "session" per client so that each request sent does not need to be authenticated on every call. Those security "sessions" count toward the MaxConcurrentSessions total.

    0 讨论(0)
  • 2020-12-30 06:50

    Are you testing on a Windows Server or Windows 7? The reason I ask is that IIS on the client OS versions has a 10 connection limit. This is to prevent the client OS from being used in a server environment.

    0 讨论(0)
  • 2020-12-30 06:55

    Are you running the client and server on the same machine? Then they might be fighting for available threads.

    If you are running on a different PC, please ensure you have done the following config changes on both client and server.

    http://www.codeproject.com/KB/webservices/quickwins.aspx

    It is possible that the client is not generating more than 10 requests to the same server. So, please try the above configs first on both client and server.

    And of course, you must have a Windows Server. Otherwise it will be the IIS limit on Windows 7.

    0 讨论(0)
提交回复
热议问题