General discussion

Locked

Getting 80070003 Error with vbscript

By cmptrwhz ·
All --

I have a vbscript running in an ASP page that I am trying to get to access a virtual directory in IIS 6. I can get the metapath of the site, but when the script tries to access the virt dir, I get a path can not be found error. Below is part of the code.. When I try to run it on the command line, I don't get the error. Any suggestions?? The Wscript.echo lines are replaced with Resource.write for the web as well.


' Retrieve instance metabase path for root
dim a, a1
a=Request.ServerVariables("INSTANCE_META_PATH")
a1=Mid(""& a &"",4)
Wscript.Echo "" & a1 &""

Set IIsWebVirtualDirObj = GetObject("IIS://localhost"& a1 &"/Root/Scripts")
If Err <> 0 Then
WScript.Echo Hex(Err.Number) & ": " & Err.Description
WScript.Echo "Error connecting to Scripts."
WScript.Quit(1)
End If

Thanks.

Mike

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by none2345506585484 In reply to Getting 80070003 Error wi ...

Hi Mike,
This error isn't exactly what's happening. It's more likely this is the result of a permissions issue for the virtual folder and/or the actual folder. Check the access permissions for these folders. The commandline works , because you are executing under your profile. The asp page will be using the ANON. profile.
Hope this helps

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums