473,412 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

File access on server

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.

Nov 19 '05 #1
2 990
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.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.


Nov 19 '05 #2
Thanks, that was the missing info i needed. i guess i'm still new to ASP

"Brock Allen" wrote:
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.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rene' Nielsen | last post by:
Context: Running Windows 2003 Server on an intranet. A web is configured with an anonymous access account that is a domain account that has been granted the desired access to a file on another...
23
by: Lamberti Fabrizio | last post by:
Hi all, I've to access to a network file from an asp pages. I've red a lot of things on old posts and on Microsoft article but I can't still solve my problem. I've got two server inside the...
4
by: R Reyes | last post by:
I am trying to code a file uploader (for forum/email attachments) from the client computer to a remote web server via the PUT method (since POST is not allowed ). However, the upload works ONLY...
2
by: reycon | last post by:
I have a problem that has been doggin me for 2 days now. I have a web app that needs to access files on another server in the same domain. but nothing that I have tried has allowed the web app...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
16
by: Eran.Yasso | last post by:
Hi, I have a mdb file shared in the LAN. I want to write app that verifies if it's open. If the file is not open, then my app can open the file. if the file is used, then the app won't open it....
5
by: =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post by:
Hello! I'm trying to copy a file from another computer on the network that I do not have permission with my current logon details to access. If I open the folder using the Windows file manager...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.