File access on server

G

Guest

I want to read the content of a text file on a server using an ASP.NET
script. Something like this:

My script is on www.whatever.com/readfile.aspx
The file I what to read is on www.somethingelse.net/File.txt

Of course I can’t use any File system functions like File.OpenText(…)
because my script has no access to the other servers file system. However, I
know that there is a way of getting the file content. I just don’t know how.
Any hint would be appreciated.
 
B

Brock Allen

So you're saying that your only access to these other resources is via HTTP?
You can use the HttpWebRequest and HttpWebResponse classes for this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,813
Messages
2,569,696
Members
45,482
Latest member
AshleighMo

Latest Threads

Top