访问拒绝错误当我尝试使用控制台应用程序添加新虚拟目录时

时间:2023-01-09 03:30:29

I have upgraded to a new server and my console application tries to create a virtual directory in IIS 8.5 (Windows 2012).

我已升级到新服务器,我的控制台应用程序尝试在IIS 8.5中创建虚拟目录(Windows 2012)。

I am getting this error:

我收到此错误:

[System.Runtime.InteropServices.COMException] {"Access is denied.\r\n"} System.Runtime.InteropServices.COMException ErrorCode 0x80070005

[System.Runtime.InteropServices.COMException] {“访问被拒绝。\ r \ n”} System.Runtime.InteropServices.COMException ErrorCode 0x80070005

Access is denied.

访问被拒绝。

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_IsContainer() at System.DirectoryServices.DirectoryEntries.CheckIsContainer() at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)

位于System.DirectoryServices.DirectoryEntry.Bind()的System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)位于System.DirectoryServices.DirectoryEntry.get_IsContainer()的System.DirectoryServices.DirectoryEntry.get_IsContainer()处于System.DirectoryServices.DirectoryEntries.Find的System.DirectoryServices.DirectoryEntries.CheckIsContainer() (String name,String schemaClassName)

I tried giving all permissions but still it is giving error as per this: Getting access denied while trying to create iis application from code

我尝试提供所有权限,但仍然是按照以下方式给出错误:尝试从代码创建iis应用程序时拒绝访问

1 个解决方案

#1


0  

This Solution worked for me ==>

这个解决方案适合我==>

http://blogs.msdn.com/b/jpsanders/archive/2009/05/13/iis-7-adsi-error-system-runtime-interopservices-comexception-0x80005000-unknown-error-0x80005000.aspx?CommentPosted=true#commentmessage ..

I also have to do this to resolve Access denied error ==> Run all Administrator in admin approval mode ==> Disabled ..

我还必须这样做以解决访问被拒绝错误==>在管理员批准模式下运行所有​​管理员==>已禁用..

#1


0  

This Solution worked for me ==>

这个解决方案适合我==>

http://blogs.msdn.com/b/jpsanders/archive/2009/05/13/iis-7-adsi-error-system-runtime-interopservices-comexception-0x80005000-unknown-error-0x80005000.aspx?CommentPosted=true#commentmessage ..

I also have to do this to resolve Access denied error ==> Run all Administrator in admin approval mode ==> Disabled ..

我还必须这样做以解决访问被拒绝错误==>在管理员批准模式下运行所有​​管理员==>已禁用..