COM+ IIS 7.0 的对象

发布于 2024-11-13 12:43:20 字数 2737 浏览 2 评论 0原文

我正在使用 ASP.NET 代码将 PPT 转换为图像。当我直接运行我的代码(不涉及 IIS 7.0)时,它运行完美。但是,当我将应用程序配置为 IIS 7.0,然后运行该应用程序时,会出现以下错误:

Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} 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 {91493441-5A91-11CF-8700-00AA0060263B} 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.

Source Error: 


Line 12:         ' Create an instance of PowerPoint, make it visible,
Line 13:         ' and open Pres1.ppt.
Line 14:         Dim oPP As New PowerPoint.ApplicationClass()
Line 15:         oPP.Visible = MsoTriState.msoTrue
Line 16:         Dim oPresSet As PowerPoint.Presentations = oPP.Presentations


Source File: G:\Projects\PPTTest\Default.aspx.vb    Line: 14 

Stack Trace: 


[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).]
   _Default.PPT() in G:\Projects\PPTTest\Default.aspx.vb:14
   _Default.Page_Load(Object sender, EventArgs e) in G:\Projects\PPTTest\Default.aspx.vb:8
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

请有人帮助我摆脱这种情况。我正在使用 Windows Server 2008、带有 ASP.NET Framework 4.0 的 Visual Studio 2010、基于表单的身份验证。

谢谢

I am converting PPT to images using ASP.NET code. When i run my code Directly (no IIS 7.0 involved) its runs perfect. But when i configure my application to IIS 7.0 and then run the application its giving me the following error:

Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} 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 {91493441-5A91-11CF-8700-00AA0060263B} 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.

Source Error: 


Line 12:         ' Create an instance of PowerPoint, make it visible,
Line 13:         ' and open Pres1.ppt.
Line 14:         Dim oPP As New PowerPoint.ApplicationClass()
Line 15:         oPP.Visible = MsoTriState.msoTrue
Line 16:         Dim oPresSet As PowerPoint.Presentations = oPP.Presentations


Source File: G:\Projects\PPTTest\Default.aspx.vb    Line: 14 

Stack Trace: 


[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).]
   _Default.PPT() in G:\Projects\PPTTest\Default.aspx.vb:14
   _Default.Page_Load(Object sender, EventArgs e) in G:\Projects\PPTTest\Default.aspx.vb:8
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Please someone help me out of this situation. I am using windows server 2008, Visual Studio 2010 with ASP.NET Framework 4.0, , using form based authentication.

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

揽月 2024-11-20 12:43:20

已通过向“此用户”授予权限,然后在 COM+ 设置中为您提供登录凭据来解决此问题。

it has been resolved by giving permissions to "This User" and then give you login credentials in COM+ settings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文