简体   繁体   English

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

[英]Access Denied Error When i try to add New Virtual Directory using Console Application

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错误代码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()在System.DirectoryServices.DirectoryEntry.Bind(Boolean)在System.DirectoryServices.DirectoryEntry.get_IsContainer()在System.DirectoryServices.DirectoryEntries.CheckIsContainer()在System.DirectoryServices.DirectoryEntries.Find (字符串名称,字符串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应用程序时拒绝访问

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 .. 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 .. 我还必须执行此操作来解决访问被拒绝的错误==>以管理员批准模式运行所有管理员==>禁用..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM