简体   繁体   English

LogParser访问被拒绝错误

[英]LogParser Access Denied error

I using Logparser to parse IIS Log and show information on a web page. 我使用Logparser解析IIS日志并在网页上显示信息。 Everything is working fine in my development environment but once I publish the application to server I get the following error: 在我的开发环境中一切正常,但是一旦我将应用程序发布到服务器,我就会收到以下错误:

Retrieving the COM class factory for component with CLSID {8CFEBA94-3FC2-45CA-B9A5-9EDACF704F66} failed due to the following error: 80070005 Access is denied. 由于以下错误,检索具有CLSID {8CFEBA94-3FC2-45CA-B9A5-9EDACF704F66}的组件的COM类工厂失败:80070005访问被拒绝。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))。

Description: An unhandled exception occurred during the execution of the current web request. 描述:执行当前Web请求期间发生未处理的异常。 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 {8CFEBA94-3FC2-45CA-B9A5-9EDACF704F66} failed due to the following error: 80070005 Access is denied. 异常详细信息:System.UnauthorizedAccessException:由于以下错误,检索具有CLSID {8CFEBA94-3FC2-45CA-B9A5-9EDACF704F66}的组件的COM类工厂失败:80070005访问被拒绝。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))。

What does this error means and how can I solve this? 这个错误意味着什么,我该如何解决?

You may need to give the user it's running under on the server DCOM permission to run it. 您可能需要让用户在服务器上运行DCOM权限才能运行它。 DCOM config is located in Component Services and you can see the GUIDs for each entry so you should be able to identify the relevant entry. DCOM配置位于组件服务中,您可以看到每个条目的GUID,因此您应该能够识别相关条目。

Then edit the security permissions for it and give the relevant user Launch and Activation permissions and Access permissions. 然后编辑它的安全权限,并为相关用户提供启动和激活权限以及访问权限。

This error is coming because of lack of permissions. 由于缺少权限,此错误即将发生。 You need to give the read/write permission to IIS Users/Guest in Virtual Directory. 您需要为虚拟目录中的IIS Users / Guest授予读/写权限。

IIS 7+ may not be configured to run 32 bit applications. IIS 7+可能未配置为运行32位应用程序。 From your Application Pool, navigate to Advanced Settings, and Enable 32 bit applications. 从应用程序池中,导航到“高级设置”和“启用32位应用程序”。

I encountered the same issue you describe, and the steps I took to resolve it included: 我遇到了您描述的相同问题,我采取的解决方法包括:

  • Enabling 32 bit applications under the app pool 在应用程序池下启用32位应用程序
  • From the log folders (inetpub/logs/LogFiles/{site}, granting access to the app pool identity 从日志文件夹(inetpub / logs / LogFiles / {site},授予对应用程序池标识的访问权限
  • Copying the LogParser.dll and Interop.MSUtil.dll to the site's bin folder 将LogParser.dll和Interop.MSUtil.dll复制到站点的bin文件夹

The steps I used to resolve the problem are as follows: 我用来解决问题的步骤如下:

  1. Go to IIS Manager 转到IIS管理器
  2. Navigate to the site in question 导航到相关网站
  3. enable the ASP.NET authentication for your default website 为您的默认网站启用ASP.NET身份验证

This should clear up the permission issue. 这应该清除许可问题。

Create dedicated application pool for site and switch its identity to "Network Services". 为站点创建专用应用程序池并将其标识切换为“网络服务”。 Solved the issue for me 为我解决了这个问题

I had to try three things: 我不得不尝试三件事:

1- See if the LogParser.dll was registred with regsvr32.exe; 1-查看LogParser.dll是否已使用regsvr32.exe注册;
2- Change permission on Application Pool to Network Service; 2-将应用程序池的权限更改为网络服务;
3- Accept 32-bit applications on Application Pool; 3-在应用程序池上接受32位应用程序;

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

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