DirectoryEntry de = new DirectoryEntry("IIS://机器名或IP/W3SVC/1/ROOT");string path = "GC://CN='机器名',DC=xxx,DC=com,DC=cn";
string strUserName = UserName + "@xxx.com.cn";
DirectoryEntry dir = new DirectoryEntry(path, strUserName, UserPassword);以上new DirectoryEntry 时,不管哪种方式系统都不会抛出异常,但跟踪对象属性时,发现几乎所有的属性都会报:
“XX.Guid”引发了“System.Runtime.InteropServices.COMException”类型的异常。如:
“de.Guid”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.Name”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.NativeGuid”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.NativeObject”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.ObjectSecurity”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.Options”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.Parent”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.SchemaClassName”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.SchemaEntry”引发了“System.Runtime.InteropServices.COMException”大家帮我看看是怎么回事儿.先谢过了。
string strUserName = UserName + "@xxx.com.cn";
DirectoryEntry dir = new DirectoryEntry(path, strUserName, UserPassword);以上new DirectoryEntry 时,不管哪种方式系统都不会抛出异常,但跟踪对象属性时,发现几乎所有的属性都会报:
“XX.Guid”引发了“System.Runtime.InteropServices.COMException”类型的异常。如:
“de.Guid”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.Name”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.NativeGuid”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.NativeObject”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.ObjectSecurity”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.Options”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.Parent”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.SchemaClassName”引发了“System.Runtime.InteropServices.COMException”类型的异常
“de.SchemaEntry”引发了“System.Runtime.InteropServices.COMException”大家帮我看看是怎么回事儿.先谢过了。
解决方案 »
- C#模拟物体运动
- 读取xml,返回datatable?
- A field or property with the name 'JudgeTime' was not found on the selected data source.
- str1.Replace(CrLf, "<br>").Replace(" ", " ")为什么只有起作用:str1.Replace(" ", " ")
- 吴旗娃大哥和各位webdiyer分页控件用户进来看看啊!分页控件问题。
- js 问题
- 网络游戏
- 安装了.NET后ASP不能运行了?
- 如何在DataGrid中格式化Boolean变量成为复选框?
- 在线请看源程序~~~
- 类、结构或接口成员声明中的标记“namespace”无效
- 关于在线考试计时的问题--请高手指教
string path = "LOAD://x.com,DC=x,DC=com";
string strUserName = + "x\\" + UserName;这样就应该没问题了。