无法在 .Net Framework 2.0 上运行我的可执行文件
我的问题很简单,我的应用程序在框架 2.0 下完美执行,但最近我升级了代码以添加几行。
ServicePointManager.DnsRefreshTimeout = 500
ServicePointManager.DefaultConnectionLimit = 100
ServicePointManager.EnableDnsRoundRobin = False
ServicePointManager.MaxServicePointIdleTime = 1000
ServicePointManager.SetTcpKeepAlive(False, 500, 500)
现在,当我评论这些时,应用程序可以完美地执行,但是当包含的程序需要 Framework 2.0 SP2 升级时,我在 MSDN 中搜索了这一点,但看起来这可以从 Framework 1.1 获得,
我不希望我的用户因为这样的小事情而升级到 SP2,但是也无法从我的代码中删除它,是否有替代方法可以在不升级框架的情况下实现类似的 ServicePointManager
设置?
My problem is simple I have my application which was perfectly executing under framework 2.0, but recently I upgraded my code to add few lines.
ServicePointManager.DnsRefreshTimeout = 500
ServicePointManager.DefaultConnectionLimit = 100
ServicePointManager.EnableDnsRoundRobin = False
ServicePointManager.MaxServicePointIdleTime = 1000
ServicePointManager.SetTcpKeepAlive(False, 500, 500)
Now when I comment these, the application is executed flawlessly, but when included program requires Framework 2.0 SP2 upgrade, I searched MSDN for this but looks like this is available from Framework 1.1
I dont want my users to upgrage to SP2 for such minor things but cant also remove this from my code, Is there an alternate to achieve similar ServicePointManager
settings without a Framework Upgrade?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的问题线是
且仅在 . NET 2.0 SP2 及更高版本。
Your problem line is
and is supported only in .NET 2.0 SP2 and up.