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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with filesystemobject

Status
Not open for further replies.

scuttleButt

Programmer
May 17, 2000
44
0
0
US
I am working in asp pages with vbscript on Windows 2000 and I am trying to work with the code:

DIM objFSO, objFolder
SET objFSO = Server.CreateObject("Scripting.FileSystemObject")
SET objFolder = objFSO.GetFolder("\\servername\public\News\dep\depnews\")


It is working if server name is on the same physical machine and the asp page but not when I try to access another machine on the network.

Example, if my asp page is running on intranetserver and I copy the whole public folder onto that server then this works:
SET objFolder = objFSO.GetFolder("\\intranetserver\public\News\dep\")

if I leave the folder on servername so that people can put files in the folder I can't make this one work
SET objFolder = objFSO.GetFolder("\\servername\public\News\dep\")

I get the error: Microsoft VBScript runtime (0x800A004C)
Path not found

Any suggestions? Thanks.
 
Have you tried to play with virtual folders and Server.MapPath ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
The account your pages run under may only have local-machine access rights. This is normal, done for security reasons. If access to other machines is needed though it can be overidden to meet special requirements. Use an account with the necessary network resource access rights.


Some of this is covered in INFO: Security Ramifications for IIS Applications

"Setting Anonymous Authentication in IIS Manager means that IIS will not use any HTTP authentication mechanism to control access to resources on the machine. By default, when IIS is installed, it creates a user account called IUSR_<servername>, where <servername> is the name of the server on which IIS is running. This user account is added to the "Guests" group on the machine, which implies that its access to resources is limited. When an HTTP request is received by IIS with Anonymous authentication being used, IIS will impersonate the IUSR_<servername> account in order to execute any code or access any files that are involved in the request. This allows a level of security by limiting the accessibility to such things as system files by an unauthenticated user. IIS is able to impersonate the IUSR_<servername> account because the username and password credentials for this account are known by IIS."


IIS administration is beyond the scope of the VBScript forum. You might find more help in the ASP forum or an admin forum like the ones for Windows 2000 Server and Windows 2003 Server.
 
Thank you both for the tips, I will work both issues to see if either works. I have not tried the mappath I will try that.

I think the Intranet machine has privileges to access other machines, it accesses my SQL server fine and it is a different physical machine. I work at a military installation and we had to disable all our anonymous IUSR_ accounts but I think we got around that by making the machine itself a user and giving that user access to the SQL server.

The other machine that I refer to in my problem and am trying to access has an everybody-type access on it. It is what we consider a "public" server where everybody and their brother on the network can dump stuff to it so I am pretty sure that it can access that one to but I will recheck to be sure.

Thanks again, I appreciate the responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top