473,573 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Read a file through FSO??

Hi,

I am trying to read a file through classic ASP. The file is located on a
file server, seperate from the webserver.

This is the path I'm trying to read the file from

\\FILESERVER\MY FOLDER\myfile.t xt

How can I accomplish this task?

Thnx.
Feb 21 '06 #1
7 1907
mavrick_101 wrote:
Hi,

I am trying to read a file through classic ASP. The file is located
on a file server, seperate from the webserver.

This is the path I'm trying to read the file from

\\FILESERVER\MY FOLDER\myfile.t xt

How can I accomplish this task?

The answer is in your subject line.
Start here: http://www.aspfaq.com/show.asp?id=2039

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 21 '06 #2
The files server needs a local user account created on it that matches the
name of the "IUSR" on the webserver and the passwords must match (a Domain
level account may also work, I don't know). Since the password of the real
IUSR account is randomly generated and "unknown" you would have to change it
to something you know. Then it will have to be matched in the properties of
each website on the webserver that uses it. It is in the Directory Security
section under "anonymous" .

In other words,...it is a lot of work.

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com

"mavrick_10 1" <ma********@dis cussions.micros oft.com> wrote in message
news:8A******** *************** ***********@mic rosoft.com...
Hi,

I am trying to read a file through classic ASP. The file is located on a
file server, seperate from the webserver.

This is the path I'm trying to read the file from

\\FILESERVER\MY FOLDER\myfile.t xt

How can I accomplish this task?

Thnx.

Feb 21 '06 #3
>This is the path I'm trying to read the file from
\\FILESERVER\M YFOLDER\myfile. txt

It would help if you specified why you want this and what if anything is
causing you a problem.

For example if you wish to feed this file to the client then it may be
better to create a virtual folder to this file share to allow the client
access to myfile.txt 'directly' from your server.

Anthony.
Feb 21 '06 #4
How can I use a Domain account with FSO?

Thnx

"Phillip Windell" wrote:
The files server needs a local user account created on it that matches the
name of the "IUSR" on the webserver and the passwords must match (a Domain
level account may also work, I don't know). Since the password of the real
IUSR account is randomly generated and "unknown" you would have to change it
to something you know. Then it will have to be matched in the properties of
each website on the webserver that uses it. It is in the Directory Security
section under "anonymous" .

In other words,...it is a lot of work.

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com

"mavrick_10 1" <ma********@dis cussions.micros oft.com> wrote in message
news:8A******** *************** ***********@mic rosoft.com...
Hi,

I am trying to read a file through classic ASP. The file is located on a
file server, seperate from the webserver.

This is the path I'm trying to read the file from

\\FILESERVER\MY FOLDER\myfile.t xt

How can I accomplish this task?

Thnx.


Feb 21 '06 #5
I'm going to take the content of the file and display in an asp page after
manipulation.

"Anthony Jones" wrote:
This is the path I'm trying to read the file from

\\FILESERVER\M YFOLDER\myfile. txt

It would help if you specified why you want this and what if anything is
causing you a problem.

For example if you wish to feed this file to the client then it may be
better to create a virtual folder to this file share to allow the client
access to myfile.txt 'directly' from your server.

Anthony.

Feb 21 '06 #6
"mavrick_10 1" <ma********@dis cussions.micros oft.com> wrote in message
news:B6******** *************** ***********@mic rosoft.com...
How can I use a Domain account with FSO?


?? You don't as far as I know. FSO lives on Mars,....Domain Accounts live
on Venus. They have nothing to do with each other.

The ASP engine runs under the Web Application,... the Web Application runs
under the default IIS anonymous local user account
(IUSR_<machinen ame>),...theref ore FSO makes all of its "accesses" using the
*local* IUSR_<machinena me> account,...whic h any other machine is not going
to have a clue about,...theref ore you have to duplicate that account (with
corresponding password) either locally on the target machine or at the
domain level and set the NTFS permission on the target accordingly. I don't
know for sure if the domain level works, but it might.

As I said last time,...a lot of work,...do you really want to deal with it?
Finding a way to keep the files directly on the Web Server machine is a lot
easier.

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
Feb 23 '06 #7
"mavrick_10 1" <ma********@dis cussions.micros oft.com> wrote in message
news:8A******** *************** ***********@mic rosoft.com...
: Hi,
:
: I am trying to read a file through classic ASP. The file is located on a
: file server, seperate from the webserver.
:
: This is the path I'm trying to read the file from
:
: \\FILESERVER\MY FOLDER\myfile.t xt
:
: How can I accomplish this task?

The easiest way is to give the IUSR account on the web server, the rights it
needs on the other server.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Feb 26 '06 #8

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

Similar topics

10
5308
by: Yang Li Ke | last post by:
Hi guys! I have some datas that I must check everytime a visitor comes to my site What is better to do: 1- Read data from a file or 2- Read data from a mysql db Thank you
10
2268
by: ZafT | last post by:
Thanks in advance for any tips that might get me going in the right direction. I am working on a simple exercise for school that is supposed to use read to read a file (about 10 MB). I am supposed to change the buffer size and see how this affects the read time. In other words, the buffer is supposed to limit how much of the file gets...
1
6731
by: cnu | last post by:
My program generates a log file for every event that happens in the program. So, I open the file and keep it open till the end. This is how I open the file for writing: <CODE> public CLogHandler() { this.m_fsLog = new FileStream(strTodaysLogFile, System.IO.FileMode.Append, System.IO.FileAccess.Write, System.IO.FileShare.Read);...
4
2724
by: ESPN Lover | last post by:
Below is two snippets of code from MSDN showing how to read a file. Is one way preferred over the other and why? Thanks. using System; using System.IO; class Test { public static void Main()
8
23895
by: a | last post by:
I have a struct to write to a file struct _structA{ long x; int y; float z; } struct _structA A; //file open write(fd,A,sizeof(_structA)); //file close
5
3290
by: lovecreatesbea... | last post by:
The condition at line 31 is added to check if the program finished to read the whole file. Is it needed and correct? Thank you. #include <fstream> #include <iostream> #include <string> using namespace std; int read(string filename, int last_pos) {
0
5766
by: lovecarole | last post by:
hi, i am the student who should write a program about reading wav file and do the DFT. actually i don't know how to read data of the wav song and save it into the array... if i want to read 17640 every times., and i set byte read=new byte, i have the wav format paper, but i don't know how to read the data correctly into the byte array,...
6
32853
by: Thomas Kowalski | last post by:
Hi, currently I am reading a huge (about 10-100 MB) text-file line by line using fstreams and getline. I wonder whether there is a faster way to read a file line by line (with std::string line). Is there some way to burst read the whole file and later "extract" each line? Thanks in advance, Thomas Kowalski
9
7374
by: flebber | last post by:
I was working at creating a simple program that would read the content of a playlist file( in this case *.k3b") and write it out . the compressed "*.k3b" file has two file and the one I was trying to read was maindata.xml . I cannot however seem to use the gzip module correctly. Have tried the program 2 ways for no success, any ideas would be...
2
5443
by: Kevin Ar18 | last post by:
I posted this on the forum, but nobody seems to know the solution: http://python-forum.org/py/viewtopic.php?t=5230 I have a zip file that is several GB in size, and one of the files inside of it is several GB in size. When it comes time to read the 5+GB file from inside the zip file, it fails with the following error: File "...\zipfile.py",...
0
8179
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8035
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6356
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3698
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3694
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2166
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
992
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.