472,131 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

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 2608
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.