473,385 Members | 1,570 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,385 software developers and data experts.

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\MYFOLDER\myfile.txt

How can I accomplish this task?

Thnx.
Feb 21 '06 #1
7 1902
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\MYFOLDER\myfile.txt

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_101" <ma********@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.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\MYFOLDER\myfile.txt

How can I accomplish this task?

Thnx.

Feb 21 '06 #3
>This is the path I'm trying to read the file from
\\FILESERVER\MYFOLDER\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_101" <ma********@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.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\MYFOLDER\myfile.txt

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\MYFOLDER\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_101" <ma********@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.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_<machinename>),...therefore FSO makes all of its "accesses" using the
*local* IUSR_<machinename> account,...which any other machine is not going
to have a clue about,...therefore 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_101" <ma********@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.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\MYFOLDER\myfile.txt
:
: 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
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
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...
1
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...
4
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...
8
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
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...
0
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...
6
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)....
9
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...
2
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.