C# webclient从windows server(2008 R2)返回有效字符串,从工作站(windows 8.1)返回空字符串

C# webclient从windows server(2008 R2)返回有效字符串,从工作站(windows 8.1)返回空字符串,c#,xml,ssis,webclient,C#,Xml,Ssis,Webclient,从Windows Server(2008 R2)上SSIS(2008 R2)中的脚本组件运行以下代码时,将返回一个字符串。当相同的代码在Windows 8.1上运行时,它返回一个空字符串 当我在本地系统的chrome中使用put URL字符串时,返回字符串。当我把它放进IE 11中时,什么也没有返回。我的默认浏览器是chrome string url = Dts.Variables["User::URL"].Value.ToString(); //Create a Web Client Sys

从Windows Server(2008 R2)上SSIS(2008 R2)中的脚本组件运行以下代码时,将返回一个字符串。当相同的代码在Windows 8.1上运行时,它返回一个空字符串

当我在本地系统的chrome中使用put URL字符串时,返回字符串。当我把它放进IE 11中时,什么也没有返回。我的默认浏览器是chrome

string url = Dts.Variables["User::URL"].Value.ToString();

//Create a Web Client
System.Net.ServicePointManager.DefaultConnectionLimit = int.MaxValue;  
using (WebClient client = new WebClient())
{
     //Download the xml document as a string
     xmlDoc = client.DownloadString(url);
}

url可能需要某种形式的身份验证吗?您需要使用wireshark或fiddler之类的嗅探器来找出问题所在。我会比较好的情况和坏的情况。端口号被病毒检查(或防火墙)阻止,url需要添加到IE中允许的站点,或者需要使用代理服务器。有时候,从IE中删除cookie是有帮助的,因为坏的或过期的cookie会阻止连接。谢谢您的输入。我相信我们正在寻求一个新的非SSIS实现选项,但我会将此信息放在手边,或者在下次遇到此问题时保存。