Link to home
Start Free TrialLog in
Avatar of majidbhatti
majidbhatti

asked on

XML & ASP.NET Error:"The underlying connection was closed: Unable to connect to the remote server"

hello

i am trying to create rss news reader for which i am use the rss xml given by BBC news. I am using Asp.Net and implementing this way:

         Dim loc = "http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml"
        Dim XmlResol As New XmlUrlResolver()
        Dim xmlDoc As New XmlDocument()

        XmlResol.Credentials = New NetworkCredential("user", "pass", "domain")
        xmlDoc.XmlResolver = XmlResol

        Try
            xmlDoc.Load(loc)
        Catch ex As Exception
            Throw ex
        End Try

 but when i run this code i get error message as "The underlying connection was closed: Unable to connect to the remote server."  i donot know how to resolve this error and what is this error about.. I have also tried to pass my credentials but still it is not working...I am working in the firewall environment.. i donot know that firewall have to do something with xml...
plz help me out....
Avatar of culshaja
culshaja
Flag of United Kingdom of Great Britain and Northern Ireland image

It usually means that the destintaion/url cannot be accessed. This is a common error when using Webservices and the machine cannot get access to the URL and so gets a 404 error.

James :-)
Avatar of majidbhatti
majidbhatti

ASKER

i ahve solved the problem by setting IP on my computer which is bypassing proxy.... & firewall.....

Thanks for the comments
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial