方法一:
AppDomain appDomain = AppDomain.CreateDomain("");
appDomain.ExecuteAssembly(@"yourApp.exe");
AppDomain.Unload(appDomain);
方法二:
<system.net>
<connectionManagement>
<add address="*" maxconnection="100"/>
</connectionManagement>
</system.net>
方法三:
ServicePointManager.DefaultConnectionLimit = 100;
方法四:
protected override WebRequest GetWebRequest(Uri uri) {
HttpWebRequest req = (HttpWebRequest)base.GetWebRequest(uri);
ServicePoint currentServicePoint = req.ServicePoint;
currentServicePoint .ConnectionLimit = 100;
return req; }
posted @ 2007-11-26 14:50
lywf 阅读(110)
评论(0) 编辑 收藏