注册表访问错误,当迁移ASP.NET应用程序IIS7 [英] Registry access error when Migrating ASP.NET application to IIS7

查看:557
本文介绍了注册表访问错误,当迁移ASP.NET应用程序IIS7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行Windows 7 64位和IIS7。我试图设置,这是previously在XP IIS6的Web应用程序。它给了我下面的错误。我已经添加了网络服务的用户的性能监视器用户组无济于事。


  

访问注册表项全球是
  否认。说明:未处理
  期间发生的异常
  当前Web请求的执行。
  有关详情,请堆栈跟踪
  有关该错误以及信息
  它起源于code。


  
  

异常详细信息:
  System.UnauthorizedAccessException的:
  访问注册表键'全球'是
  否认。


  
  

ASP.NET未被授权的访问
  所请求的资源。考虑
  授予访问权限的资源
  到ASP.NET请求标识。
  ASP.NET有一个基进程标识
  (通常{MACHINE} \\ ASPNET,在IIS 5
  或者IIS网络服务6)是
  使用,如果该应用程序是不
  冒充。如果该应用程序是
  通过,身份冒充
  将是匿名用户(通常
  为IUSR_MACHINENAME)或经过身份验证
  请求用户。


  
  

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



解决方案

的问题是,用户在Windows被称为默认应用。但是,他并没有出现在安全对话框中的任何地方。他虽然是一个实际的用户。我的问题是我需要的用户是PerformanceMonitorUsers组的一部分,因为我的web服务使用PerformanceCounters。原来,你必须在命令行中做到这一点。

净本地组性能监视器用户默认应用/添加

有时不工作,它会给你的错误:没有这样的用户或组:默认应用

要添加用户以不同的方式:


  1. 转至开始菜单在Windows 7中。

  2. 在搜索框中输入
  3. 键入编辑用户。

  4. 打开编辑本地用户和组。

  5. 转至组文件夹中。

  6. 右键点击性能监视器Users组,并转到属性。

  7. 单击添加按钮。

  8. 在IIS APPPOOL \\默认应用,然后单击检查名称。

  9. 单击OK,你应该是好去。

I'm running windows 7 64-bit and iis7. I'm trying to setup a web application that was previously in iis6 on XP. It's giving me the error below. I've added the network service user to the Performance Monitor Users group to no avail.

Access to the registry key 'Global' is denied. 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: Access to the registry key 'Global' is denied.

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) 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.

解决方案

The problem is that user in Windows is known as DefaultAppPool. However he doesn't show up anywhere in the security dialogs. He is an actual user though. My problem was I needed that user to be part of the PerformanceMonitorUsers group because my web service was using PerformanceCounters. Turns out you have to do it from the command line.

net localgroup "Performance Monitor Users" DefaultAppPool /add

Occasionally that does not work and it will give you the error: "There is no such user or group: DefaultAppPool"

To add the user a different way:

  1. Go to the Start menu in Windows 7.
  2. Type "Edit Users" in the search box.
  3. Open "Edit Local Users and Groups".
  4. Go to the groups folder.
  5. Right-click on the "Performance Monitor Users" group and go to properties.
  6. Click the Add... button.
  7. Type in "IIS APPPool\DefaultAppPool" and click Check Names.
  8. Click OK and you should be good to go.

这篇关于注册表访问错误,当迁移ASP.NET应用程序IIS7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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