首页蓝耳朵|小小蓝耳朵广州图书馆外文室英语儿童读物资源介绍网佛教青年之友旧版收集永硕E盘Phonics Short Vowels Game 
使用DirectoryEntry对象时一直报0x80005000L出错的解决办法
所属栏目:winform  时间:2011-07-26 20:37  作者:狼子

确认是传递的路径出错造成

在iis6里

应用程序池的路径是:IIS://localhost/W3SVC/AppPools

网站的路径是:IIS://localhost/W3SVC

如果是iis7,window有另外提供dll,使用另一种方法管理

如果是在win7下开发,使用虚拟机,在win7下安装虚拟机运行win2003
http://www.nnllok.cn/Read.aspx?cid=18&id=591


http://support.microsoft.com/kb/232282/en-us
Active Directory Services Interface Error Codes in Windows 2000
0x80005000L  E_ADS_BAD_PATHNAME            An invalid ADSI path name was passed.

http://directoryprogramming.net/forums/thread/1754.aspx
It is actually a mistranslation of the error code reported by Windows.
The actual error is "invalid path name" which happens when you pass an incorrectly formatted path to a DirectoryEntry constructor.
Unfortunately, the stack trace above is not correct as it doesn't show the S.DS code that is throwing the exception.
This is likely because some caught the error and rethrew it instead of allowing it to propagate up the call stack.

小楼宝宝的涂鸦花花(Imitater)的博客起名称骨测字皖ICP备06000023号-17