Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

System.DirectoryServices.DirectoryEntry Error

$
0
0

while trying to create New Virtual folder using asp.net(c#) 64bit I am getting the error

SchemaClassName    'Parent.SchemaClassName' threw an exception of type 'System.Runtime.InteropServices.COMException'    string {System.Runtime.InteropServices.COMException}

i am using windows7 mac and dot net framework 3.5, 64 bit

the code is given below

///////////////////////////////////////////////////////////////////////

DirectoryEntry Parent = new DirectoryEntry(@"IIS://localhost/W3SVC/" + ServerId.ToString() + "/Root");
DirectoryEntry NewVirtualDir;
NewVirtualDir = Parent.Children.Add(VirtualDirName, Parent.SchemaClassName.ToString());

/////////////////////////////////////////////////////////////////////////////////////

Below I am giving some information from quick watch(if it helps)

Guid    'Parent.Guid' threw an exception of type 'System.Runtime.InteropServices.COMException'    System.Guid {System.Runtime.InteropServices.COMException}
Name    'Parent.Name' threw an exception of type 'System.Runtime.InteropServices.COMException'    string {System.Runtime.InteropServices.COMException}
NativeGuid    'Parent.NativeGuid' threw an exception of type 'System.Runtime.InteropServices.COMException'    string {System.Runtime.InteropServices.COMException}
NativeObject    'Parent.NativeObject' threw an exception of type 'System.Runtime.InteropServices.COMException'    object {System.Runtime.InteropServices.COMException}
ObjectSecurity    'Parent.ObjectSecurity' threw an exception of type 'System.Runtime.InteropServices.COMException'    System.DirectoryServices.ActiveDirectorySecurity {System.Runtime.InteropServices.COMException}
Options    'Parent.Options' threw an exception of type 'System.Runtime.InteropServices.COMException'    System.DirectoryServices.DirectoryEntryConfiguration {System.Runtime.InteropServices.COMException}
Parent    'Parent.Parent' threw an exception of type 'System.Runtime.InteropServices.COMException'    System.DirectoryServices.DirectoryEntry {System.Runtime.InteropServices.COMException}
        Path    "IIS://localhost/W3SVC/1/Root"    string
Properties    {System.DirectoryServices.PropertyCollection}    System.DirectoryServices.PropertyCollection
SchemaClassName    'Parent.SchemaClassName' threw an exception of type 'System.Runtime.InteropServices.COMException'    string {System.Runtime.InteropServices.COMException}
SchemaEntry    'Parent.SchemaEntry' threw an exception of type 'System.Runtime.InteropServices.COMException'    System.DirectoryServices.DirectoryEntry {System.Runtime.InteropServices.COMException}

Please help as I am totally new to it.


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>