Read a file through FSO??

M

mavrick_101

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.
 
B

Bob Barrows [MVP]

mavrick_101 said:
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
 
P

Phillip Windell

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.
 
A

Anthony Jones

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.
 
M

mavrick_101

How can I use a Domain account with FSO?

Thnx

Phillip Windell said:
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 said:
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.
 
M

mavrick_101

I'm going to take the content of the file and display in an asp page after
manipulation.
 
P

Phillip Windell

mavrick_101 said:
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.
 
R

Roland Hall

: 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
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top