I was getting the same kind of error using XmlTextReader with a url string.
Check out the following:
http://support.microsoft.com/?kbid=888527 and look at the section on
Undocumented bugs in the .NET Class Library (NCL).
Also, google the term: useUnsafeHeaderParsing for more info on the problem.
It seems that in .NET 1.0 SP3 and beyond a change was made in what is
considered a mal-formed http header. Basically you need to add the
following section to your apps config file:
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
Hope this helps....
"Harry Keck" <Ha*******@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
I am calling XmlDocument.Load with a url string, but get the message "The
underlying connection was closed: Unable to connect to the remote server."
When I put the exact same URL in IE, the xml file comes up just fine.
Also, we only get this error when running from some machines, not all. Does
anyone know what is wrong? Thanks.