Getting 80070003: Error connecting to location

M

Mike Snetzko

Hi All --

I have a website on an IIS 6.0 server and I am trying to update the settings
via asp page and vbscript. Below is the code that is supposed to retrieve
the Metapath, and it does, however it is erroring out with 80070003, Can not
find path when I am trying to get connected using the Set IIsWebVirtualDirObj
command.

' Retrieve instance metabase path for root
dim a, a1
a=Request.ServerVariables("INSTANCE_META_PATH")
a1=Mid(""& a &"",4)
Response.Write "<p>" & a1 &"<p>"

On Error Resume Next
dim virtdir
virtdir="IIS://localhost" & a1 & "/"& link &""
Response.Write "<p>"& virtdir &"<p>"
Set IIsWebVirtualDirObj=GetObject(""& virtdir &"")
Response.Write ""& IIsWebVirtualDirObj & "<p>"
If Err <> 0 Then
Response.Write Hex(Err.Number) & ": " & Err.Description & "<br>"
Response.Write "Error connecting to location."
End If

Thanks in advance.
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top