开发者

Error when I use XPath.XPathDocument() function

I'm using this code in my ASP.NET/VB.NET project:

Dim sourceFile as String = "http://xml.weather.yahoo.com/forecastrss?p=94704"
Dim xPath As N开发者_如何学Goew XPath.XPathDocument(sourceFile)

and the second line gives the error: "Unable to connect to the remote server"

When I browse the url (sourceFile) in web browser, it opens the RSS feeds page finely. How can I remove this error?


Here is nothing about XPath.XPathDocument if your application is unable to connect to the remote server.

Check the connection using another method, e.g. WebClient.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜