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
.
精彩评论