Getting 80070003 Error with vbscript - TechRepublic
General discussion
December 13, 2005 at 11:06 AM
cmptrwhz

Getting 80070003 Error with vbscript

by cmptrwhz . Updated 20 years, 7 months ago

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 discussion is locked

All Comments