Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing a text file to the network

Status
Not open for further replies.

Waz816

Programmer
Oct 4, 2001
10
US
It seems as though all the examples I've seen are of writing a text file to the local hard drive(c:). I got my app to write to the hard drive in development using:
set txtFileObj = fsoObj.OpenTextFile("c:\testfile.txt", 2, true). This works just fine.

Now that my app works the way I want it, I need to write it to the network so that another app can pick it up and use the contents. I tried to use the following line but get a
"Path not found" error.

set txtFileObj = fsoObj.OpenTextFile("n:\GROUP\Eagle\Plotting\Gas\map_file.txt", 2, true)

Any suggestions would be appreciated. Thanks.
 
change this line ("n:\GROUP\Eagle\Plotting\Gas\map_file.txt", 2, true)

to something like this

("\\servername\Eagle\Plotting\Gas.....")
the only way that the n: will work is if you have it mapped to the server that you are using. And that is not the best security idea. You will also want to make sure that your Iuser has rights on the box you are writing to.

Hope that helps
Roj
 
I have tried that kind of path name to no avail. What I'm hearing from a few people here a work is that this could be a network rights issue.

Does anyone know how to get the ID of who/what is trying to write a file from the filesystemobject? Our security people want to know so we can figure out how the access rights need to be set. Is there a way to write out the user ID to the file for debugging purposes. Because I have no problems writing to the C: drive at all to find out what's going on behind the scenes.

Thanks
Chris
 
Unless you have changed it in IIS everyone from the web that uses that page will be logged as iusr_computerName.

You can however change it to make them use NT Challenge response. In that case if they are logged in using NT there user id and password will be used. When your script goes to write to the server it will pass that information to the server. However that has the potential to be a maint. nightmare. What we have done in the past is set up a domain user for that specific purpose and then set that as the account to use instead of the iusr account.

I hope that helps

Roj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top