M
Mik
Hi
I am struggling to make a Web site/Web Directory copy work. I am using
the System.DirectoryServices to connect to my localhost machine.
There I have two web sites: Mysite1 (siteno 1) and Mysite2 (siteno 2).
I want to copy one directory or web app from Mysite1 to Mysite2 and I
cant get it to work. Have tried alot of different ways but no one will
work.
Heres a code example
Imports System.DirectoryServices
Public Sub Copy()
Dim oIIS_Source As New DirectoryEntry
"IIS://localhost/w3svc/2/root/test")
Dim oIIS_Target As New
DirectoryEntry("IIS://localhost/w3svc/1/root/test")
Dim oNewDir as DirectoryEntry
oNewDir = oIIS_Source.CopyTo(oIIS_Target)
I get "Path not found" error.
I can create Virtual directories by using DirectoryEntry but I cant
copy one to the other.
Any ideas?
Regards
Mikael
End Sub
I am struggling to make a Web site/Web Directory copy work. I am using
the System.DirectoryServices to connect to my localhost machine.
There I have two web sites: Mysite1 (siteno 1) and Mysite2 (siteno 2).
I want to copy one directory or web app from Mysite1 to Mysite2 and I
cant get it to work. Have tried alot of different ways but no one will
work.
Heres a code example
Imports System.DirectoryServices
Public Sub Copy()
Dim oIIS_Source As New DirectoryEntry
"IIS://localhost/w3svc/2/root/test")
Dim oIIS_Target As New
DirectoryEntry("IIS://localhost/w3svc/1/root/test")
Dim oNewDir as DirectoryEntry
oNewDir = oIIS_Source.CopyTo(oIIS_Target)
I get "Path not found" error.
I can create Virtual directories by using DirectoryEntry but I cant
copy one to the other.
Any ideas?
Regards
Mikael
End Sub