开发者

Cant run my Executable on .Net Framework 2.0

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.SetTcpKeepAli开发者_StackOverflow社区ve(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?


Your problem line is

ServicePointManager.SetTcpKeepAlive

and is supported only in .NET 2.0 SP2 and up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜