80070005访问被拒绝,当与水晶报表asp.net网站部署专用服务器上 [英] 80070005 Access is denied,when asp.net website with crystal report is deployed on dedicated server

查看:279
本文介绍了80070005访问被拒绝,当与水晶报表asp.net网站部署专用服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这是使用水晶报告。该应用程序中显示该报告的asp.net应用程序是我们的专用服务器上部署该应用程序和专用server.when还安装水晶报表运行时引擎在我的本地PC.I正常工作我尝试preSS报告才能看到这份报告,我得到上述error.I改变文件夹的权限C:\\ WINDOWS \\ TEMP充分控制研究(通过选择TEMP文件夹中的财产,为所有用户(IIS用户,network..etc))。我不知道这是否是给予完全控制权限到该文件夹​​的正确方法(我不是太了解有关网络概念),但完全控制研究我的权限我仍然得到同样的错误和error.The是:


  

与CLSID检索COM类工厂组件
  {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}失败,原因是以下
  错误:80070005访问被拒绝。 (异常来自HRESULT:0X80070005
  (E_ACCESSDENIED))。


  
  

说明:在执行过程中发生未处理的异常
  当前Web请求。有关详情,请堆栈跟踪
  有关错误的信息以及它起源于code。


  
  

异常详细信息:System.UnauthorizedAccessException:检索
  COM类工厂与CLSID成分
  {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}失败,原因是以下
  错误:80070005访问被拒绝。 (异常来自HRESULT:0X80070005
  (E_ACCESSDENIED))。


  
  

ASP.NET未被授权访问所请求的资源。考虑
  授予访问权限的资源添加到ASP.NET请求
  身份。 ASP.NET有一个基进程标识(通常
  {MACHINE} \\ ASPNET,在IIS 5或网络服务IIS 6和IIS 7,和
  在IIS 7.5所使用,如果配置的应用程序池标识)
  该应用程序没有模拟。如果该应用程序是
  通过模仿,身份会
  匿名用户(通常为IUSR_MACHINENAME)或经过身份验证
  请求用户。


  
  

要ASP.NET访问权限授予一个文件,右键单击该文件在资源管理器,
  选择属性,然后选择安全选项卡。点击添加来添加
  适当的用户或组。突出显示ASP.NET帐户,
  检查框所需的访问。



解决方案

我有一个客户端的Windows Server 2003的计算机上运行IIS6同样的问题。他们的服务器非常锁定的比较正常的服务器,有什么东西在锁定向下可能是这个问题。我还没有许多其他客户的服务器遇到这个问题。我还没有解决的问题还没有,但这里有一些步骤,从我学会为止...

首先要做的是一个应用程序池您的应用程序在其下运行,然后检查其身份的应用程序池使用(例如网络服务或应用程序池标识或......)仔细检查。这很重要,以确保你给的权限给正确的用户。进一步,直到你确定这个不要去任何。

下一步检查,如果您正在使用 IIS模拟 (也许你不,除非你知道它是什么)。这是应用程序池是根据用户的身份运行排序的...这只能这样了,如果你使用Windows身份验证,并在你的Web.config <$ C C>&LT;身份冒充=真/&GT; 。如果您使用的是模拟那么的可能的你必须给最终用户的所有必要的文件和/或COM的访问。如果不是(在我的情况),应该只是检查权限是适合您的应用程序池的用户或用户的IIS组的问题。

一旦你知道的权限正确的身份,请尝试以下步骤:


  • 如果这是一个64位计算机检查是否具有启用32位应用程序应用程序池启用(或您已安装64位运行时)

  • 检查应用程序池标识具有访问 C:\\ WINDOWS \\ TEMP 文件夹(你提到你已经做到了这一点,但我想我会列出来其他任何人遇到的问题)。

  • 检查应用程序池的身份访问Crystal报表的文件夹,例如 C:\\ Program Files文件\\ SAP的BusinessObjects \\水晶报表的.NET Framework 4.0 \\ COMMON \\ SAP BusinessObjects Enterprise的XI 4.0 \\ 。您可以通过打开REGEDIT.EXE找到该文件夹​​并导航到 HKEY_CLASSES_ROOT \\ CLSID \\ {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} \\ InProcServer32中。获得从该注册表项中(默认)值的路径和检查该路径的父文件夹的权限。尝试给完全控制到该文件夹​​到正确的身份,看看是否能解决问题。

  • 我不知道这是否是相关的,但可能加入&LT;启动useLegacyV2RuntimeActivati​​onPolicy =真正的&GT; 来web.config中可能的帮助。 ..它建议在<一个href=\"http://seagullscientific.invisionzone.com/index.php?/topic/1349-unable-to-load-the-seagullbartenderprint-using-aspnet-40/\">this帖子与具有类似问题,所以值得一去不同的COM应用程序?所以你的web.config中添加这个标签内:

     &LT;启动useLegacyV2RuntimeActivati​​onPolicy =真正的&GT;
         &LT; supportedRuntime版本=V4.0/&GT;
    &LT; /启动&GT;


  • 检查服务器上的COM权限:


    • 从控制面板打开组件服务>管理工具

    • 展开组件服务>计算机>我的电脑,然后右键 - >属性

    • 点击COM安全标签

    • 在启动和激活权限单击编辑默认值...按钮

    • 检查列出的启动和激活权限的权限。如果你的应用程序池的用户未列出可以尝试添加它与所有4允许权限和复试。如果不解决问题,那么撤消任何更改。


  • 如果这都不是解决它,那么我建议下载进程监视器并设法确定什么它试图做击中拒绝访问。这是我的问题,所以如果我发现什么了,我会更新这个答案的下一步。

I have an asp.net application which is displaying the report using crystal report.The application is working properly on my local PC.I deployed this application on our dedicated server and also installed crystal report run time engine on dedicated server.when i try to press the report in order to see the report,i am getting the above error.I changed the permission of folder "C:\Windows\Temp" to full controll(by choosing property of "temp" folder,full controll permission for all users(IIS-users,network..etc)).I am not sure whether this is the right way to give full control permission to this folder(i am not that much aware about networking concepts).But i am still getting the same error.The error is:

Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} 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 {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} 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 , 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.

解决方案

I have the same problem on a client's windows server 2003 machine running IIS6. Their server is very locked-down compared to normal servers, and something in that locking-down is probably the problem. I haven't experienced this problem on dozens of other clients' servers. I haven't solved the problem yet but here are some steps from what I've learned so far...

First thing to do is double-check which Application Pool your app is running under, and then check which Identity the App Pool is using (e.g. Network Service or Application Pool Identity or...). This is important to ensure you're giving permissions to the right user. Don't go any further until you're sure about this.

Next check if you're using IIS Impersonation (probably you're not unless you know what it is). This is where the application pool is sort-of running under the identity of the user ... this would only be the case if you're using Windows Authentication and in the web.config you have <identity impersonate="true" />. If you are using Impersonation then probably you have to give end users all the necessary file and/or COM access. If not (as in my case) it should just be a matter of checking the permissions are right for your application pool's user or IIS users group.

Once you know the right identity for permissions, try these steps:

  • If it's a 64-bit machine check you have Enable 32-bit applications enabled for the Application Pool (or that you have the 64-bit runtime installed)
  • Check the Application Pool identity has access to the C:\Windows\Temp folder (you've mentioned you've done this but I thought I'd list it for anyone else encountering the problem).
  • Check the Application Pool identity has access to the Crystal Reports folder, e.g. C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\. You can find the folder by opening regedit.exe and navigate to HKEY_CLASSES_ROOT\CLSID\{4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}\InProcServer32. Get the path from the (default) value for that registry key and check the permissions on the parent folder for that path. Try giving Full Control to the folder to the right identity to see if that fixes the problem.
  • I'm not sure if this is relevant, but possibly adding <startup useLegacyV2RuntimeActivationPolicy="true"> to the web.config might help ... it was suggested in this post relating to a different COM application having similar problems so worth a go? So you'd add this inside the tag within web.config:

    <startup useLegacyV2RuntimeActivationPolicy="true"> 
         <supportedRuntime version="v4.0"/> 
    </startup>
    

  • Check the COM permissions on the server:

    • open Component Services from Control Panel > Administrative Tools
    • expand Component Services > Computers > My Computer then right-click > properties
    • click on the COM Security tab
    • In the Launch and Activation Permissions click on the Edit Default... button
    • Check the Launch and Activation Permissions permissions listed. If your app pool user isn't listed can try adding it with all 4 Allow permissions and retest. If that doesn't solve the problem then undo any changes.
  • If none of this has solved it then I suggest downloading Process Monitor and try to determine what it's trying to do that hits an Access Denied. This is the next step for me on the problem so if I find anything out I'll update this answer.

这篇关于80070005访问被拒绝,当与水晶报表asp.net网站部署专用服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆