开发者

MaxConnections and App.config question

开发者 https://www.devze.com 2023-01-13 20:07 出处:网络
I have a multipart downloader, and to get it working I\'m using this app.config <?xml version=\"1.0\"?>

I have a multipart downloader, and to get it working I'm using this app.config

<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v2.0.50727"/></startup>
<system.net>
<connectionManagement>
    <add address="*" maxconnection="65000" />
</connectionManagement>
</system.net>
</configuration>

How can I put th开发者_如何学Cat file into my executable or somehow set this param internally?


You can use:

ServicePointManager.DefaultConnectionLimit = 65000;

http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.defaultconnectionlimit.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号