VBScript Path Not Found Error when running in IIS 
Author Message
 VBScript Path Not Found Error when running in IIS

Can anybody shed some light on the following error i'm having ???

When I run the following code as an ASP page it fails with the
following
error:

Microsoft VBScript runtime (0x800A004C)
Path not found
Line 4

Yet when I run it as a VBScript it works fine ???

I'm assuming this error has somthing to do with network security
running under IIS as when I change the folder path to a local non
mapped network drive the code executes without problems.

Regards -Ben

---[ Begin Code ]--------------------------------------------

01.     Dim objFSO, objFolder, objSubFolder
02.
03.     Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
04.     Set objFolder = objFSO.GetFolder("\\svr-file\admin")
05.    
06.     Response.Write("Size: " & objFolder.Size & "<br>")
07.    
08.     Set objSubFolder = objFolder.SubFolders
09.     Response.Write("Number of Folders: " & objSubFolder.Count &
"<br><br>")
10.  
11.     For each objFolder in objSubFolder
12.             Response.Write("Folder: " & objFolder.Name & "<br>")
13.     Next

---[ End Code ]------------------------------------------------



Fri, 19 Nov 2004 06:59:01 GMT  
 VBScript Path Not Found Error when running in IIS
The user account the website is running under (IUSR_MACHINENAME) probably
can't access network resources (unlike the user account that the VBScript
runs under - the local logged on user) as it is a member of the Guest group.

Either change the IIS user account for that website, use a mapped drive or
modify the newtwork access permissions for the account / group.

Chris Barber.


Can anybody shed some light on the following error i'm having ???

When I run the following code as an ASP page it fails with the
following
error:

Microsoft VBScript runtime (0x800A004C)
Path not found
Line 4

Yet when I run it as a VBScript it works fine ???

I'm assuming this error has somthing to do with network security
running under IIS as when I change the folder path to a local non
mapped network drive the code executes without problems.

Regards -Ben

---[ Begin Code ]--------------------------------------------

01. Dim objFSO, objFolder, objSubFolder
02.
03. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
04. Set objFolder = objFSO.GetFolder("\\svr-file\admin")
05.
06. Response.Write("Size: " & objFolder.Size & "<br>")
07.
08. Set objSubFolder = objFolder.SubFolders
09. Response.Write("Number of Folders: " & objSubFolder.Count &
"<br><br>")
10.
11. For each objFolder in objSubFolder
12. Response.Write("Folder: " & objFolder.Name & "<br>")
13. Next

---[ End Code ]------------------------------------------------



Fri, 19 Nov 2004 07:23:20 GMT  
 VBScript Path Not Found Error when running in IIS
:: Can anybody shed some light on the following error i'm having ???
::
:: When I run the following code as an ASP page it fails with the
:: following
:: error:
::
:: Microsoft VBScript runtime (0x800A004C)
:: Path not found
:: Line 4
::
:: Yet when I run it as a VBScript it works fine ???
::
:: I'm assuming this error has somthing to do with network security
:: running under IIS as when I change the folder path to a local non
:: mapped network drive the code executes without problems.
::

Q207671 - HOWTO: Accessing Network Files from IIS Applications
http://support.microsoft.com/support/kb/articles/Q207/6/71.ASP

Also asked and answered in ...inetsdk.programming.scripting.vbscript

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Fri, 19 Nov 2004 07:58:15 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VBScript Path Not Found Error when running in IIS

2. Long Path Names give Runtime error 76 - Path not found

3. Long Path Names give Runtime error 76 - Path not found

4. Run Time error - Path Not Found - HELP!

5. Path not found error??

6. Error 76 Path not found with folder object

7. Path not found error??

8. The network path was not found error

9. VBScript: Path not found - why, if I may ask

10. Can not run vbscript from IIS

11. Path Not Found Error

12. VBA: Path not found Error

 

 
Powered by phpBB® Forum Software