469,358 Members | 1,605 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Reading XML files on WebServer

Hi,

I am wanting to read an XML file sitting on a server and
am wondering if I will run into problems with firewalls
and/or proxy servers using the following simple bit of
code:
XmlTextReader reader = new XmlTextReader
("http://www.myserver.com/myxmlfile.xml");

It works fine with my interent connection.

Nov 12 '05 #1
2 2571
If some of the users are behind a proxy server it may cause a problem.
Especially authentication proxy server. If you concern about these
circumstances I suggest creating a WebRequest object and set the correct
credentials, proxy server and then get the WebResponse object.

Once you get a WebResponse object you can get the Stream and load your XML
document from that stream.

HTH,
--
Victor Hadianto
http://synop.com/Products/SauceReader/

"Gordon" <an*******@discussions.microsoft.com> wrote in message
news:43****************************@phx.gbl...
Hi,

I am wanting to read an XML file sitting on a server and
am wondering if I will run into problems with firewalls
and/or proxy servers using the following simple bit of
code:
XmlTextReader reader = new XmlTextReader
("http://www.myserver.com/myxmlfile.xml");

It works fine with my interent connection.


Nov 12 '05 #2
Gordon,

XmlReader will use the HTTPWebRequest for connecting to the URL you specify
using the user credentials. If HTTPWebRequest succeeds, you will read the
file.

HTH,
Amol

"Gordon" <an*******@discussions.microsoft.com> wrote in message
news:43****************************@phx.gbl...
Hi,

I am wanting to read an XML file sitting on a server and
am wondering if I will run into problems with firewalls
and/or proxy servers using the following simple bit of
code:
XmlTextReader reader = new XmlTextReader
("http://www.myserver.com/myxmlfile.xml");

It works fine with my interent connection.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by phpfrizzle | last post: by
1 post views Thread by Dole | last post: by
1 post views Thread by James Walker | last post: by
2 posts views Thread by AAJ | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.