DirectoryEntry and CopyTo function

Discussion in 'ASP .Net' started by Mik, Jul 4, 2003.

  1. Mik

    Mik Guest

    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
     
    Mik, Jul 4, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    2,048
    Guest
    Dec 17, 2003
  2. cameron

    DirectoryEntry Disposal Test

    cameron, Apr 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    526
    Willy Denoyette [MVP]
    Apr 14, 2004
  3. =?Utf-8?B?aHV6eg==?=

    LDAP directoryEntry

    =?Utf-8?B?aHV6eg==?=, Nov 18, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    20,411
    mngates
    Jan 31, 2011
  4. Marek Kopanski
    Replies:
    1
    Views:
    2,070
    =?Utf-8?B?S2F1c3Rhdg==?=
    Mar 18, 2005
  5. tshad

    CopyTo not working for DataGrid

    tshad, Aug 28, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    822
    tshad
    Aug 28, 2007
Loading...

Share This Page