Vb.net 使用XPath.XPathDocument()函数时出错
我正在ASP.NET/VB.NET项目中使用以下代码:Vb.net 使用XPath.XPathDocument()函数时出错,vb.net,url,xpathdocument,Vb.net,Url,Xpathdocument,我正在ASP.NET/VB.NET项目中使用以下代码: Dim sourceFile as String = "http://xml.weather.yahoo.com/forecastrss?p=94704" Dim xPath As New XPath.XPathDocument(sourceFile) 第二行给出了错误: “无法连接到远程服务器” 当我在web浏览器中浏览url(sourceFile)时,它会精细地打开RSS提要页面。 如何删除此错误?如果您的应用程序无法连接到远程服务器
Dim sourceFile as String = "http://xml.weather.yahoo.com/forecastrss?p=94704"
Dim xPath As New XPath.XPathDocument(sourceFile)
第二行给出了错误:
“无法连接到远程服务器”
当我在web浏览器中浏览url(sourceFile)时,它会精细地打开RSS提要页面。
如何删除此错误?如果您的应用程序
无法连接到远程服务器
,那么这里没有关于XPath.XPathDocument的内容
使用其他方法检查连接,例如WebClient