moustiopomoke
New Member
Hi,<BR><BR>I am trying to create a copy of a virtual directory using <BR>DirectoryServices in C#. I get path not found error in the line:<BR>objDE.CopyTo(objDE2,"WebApplication2");<BR>when I run the code(no compilation error)<BR><BR>Here is the code:<BR><BR>DirectoryEntry objDE;<BR>DirectoryEntry objDE2;<BR><BR>objDE=new DirectoryEntry "IIS://LocalHost/W3SVC/1/Root/WebApplication1");<BR>objDE2=new DirectoryEntry("IIS://LocalHost/W3SVC/1/Root");<BR><BR>objDE.CopyTo(objDE2,"WebApplication2");<BR><BR>Thanx,<BR>-Sal