【发布时间】:2012-03-23 11:25:26
【问题描述】:
我在使用 Web 表单项目的 IIS 权限和 Microsoft 的 Outlook 2010 互操作程序集方面遇到问题。
我创建了一个概念验证项目,以确保我可以在我负责的特定情况下使用 Microsoft 的 Outlook 互操作程序集。演示项目运行良好,我没有任何问题。现在我正在尝试将它集成到我们的主项目中,并且遇到了 IIS 权限问题。我的网站在本地运行在 IIS 7 中。在 IIS 管理器中,我单击应用程序池 -> 我的网站 -> 高级设置。在此窗口中,我有一个名为“fileshare”的自定义身份,并带有密码(“fileshare”是为了保护对开发网络服务器上网站图像、pdf 文件等的访问而创建的)。我将 Outlook 互操作程序集复制到我们的公共共享程序集文件夹中,而不是从 GAC 中引用它。我为程序集提供了 IUSER、NETWORK SERVICE、IIS_WPG、ASP.NET 和文件共享的所有权限。我收到以下运行时错误:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-
C000-000000000046} failed due to the following error: 80070005 Access is denied.
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). Description: An unhandled
exception occurred during the execution of the current web request. Please
review the stack trace for more information about the error and where it
originated in the code.
Exception Details: System.UnauthorizedAccessException: Retrieving the COM class
factory for component with CLSID {0006F03A-0000-0000- C000-000000000046} failed
due to the following error: 80070005 Access is denied. (Exception from HRESULT:
0x80070005 (E_ACCESSDENIED)).
ASP.NET is not authorized to access the requested resource. Consider granting
access rights to the resource to the ASP.NET request identity. ASP.NET has a
base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on
IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that
is used if the application is not impersonating. If the application is
impersonating via <identity impersonate="true"/>, the identity will be the
anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose
"Properties" and select the Security tab. Click "Add" to add the appropriate
user or group. Highlight the ASP.NET account, and check the boxes for the
desired access.
我检查了 Windows 事件日志并在 Windows 日志 -> 系统下出现了这个错误:
The machine-default permission settings do not grant Local Activation permission
for the COM Server application with CLSID {0006F03A-0000-0000-
C000-000000000046} and APPID Unavailable to the user BSoup\fileshare SID
(S-1-5-21-2999627215-1482540357-33300828-1019) from address LocalHost (Using
LRPC). This security permission can be modified using the Component Services
administrative tool.
【问题讨论】:
-
您不应该... Outlook 不支持在服务器环境中运行 - 详情请点击此处msdn.microsoft.com/en-us/library/gg608200.aspx。
标签: c# asp.net iis permissions interop