您的位置:首页 > 编程语言

代码访问或设置WCF并发控制

2011-06-09 14:55 253 查看
Uri uri = new Uri("http://localhost:1539/Service.svc");
ServiceHost host = new ServiceHost(typeof(Service), uri);
ServiceThrottlingBehavior throttlingBehavior = host.Description.Behaviors.Find<ServiceThrottlingBehavior>();
return throttlingBehavior.MaxConcurrentSessions;


用throttlingBehavior对象来访问或设置

MaxConcurrentCalls

MaxConcurrentInstances

MaxConcurrentSessions
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: