2011-06-04 72 views
0

我的問題很簡單我有我的應用程序在框架2.0下完美執行,但最近我升級了我的代碼以添加幾行代碼。無法在.Net Framework 2.0上運行我的可執行文件

 ServicePointManager.DnsRefreshTimeout = 500 
     ServicePointManager.DefaultConnectionLimit = 100 
     ServicePointManager.EnableDnsRoundRobin = False 
     ServicePointManager.MaxServicePointIdleTime = 1000 
     ServicePointManager.SetTcpKeepAlive(False, 500, 500) 

現在,當我評論這些,應用程序被完美執行,但包括當程序需要Framework 2.0的升級SP2,我搜索MSDN對於這一點,但看起來這是從框架1.1

我不想我的用戶升級到SP2這樣的小事情,但也不能從我的代碼中刪除這個,是否有替代實現類似ServicePointManager設置沒有框架升級?

回答

2

您的問題行是

ServicePointManager.SetTcpKeepAlive

,並supported只在.NET 2.0 SP2及以上。

+0

感謝您的回覆,但有沒有在Framework 2.0中的替代 – CodeWrite 2011-06-04 05:58:59

相關問題