[解决方案]拒绝访问。 (异常来自HRESULT:0x80070005 (E_ACCESSDENIED))

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yao940622/article/details/79306322

【出现问题】

    看ASP.net视频时敲例子出现了如题所示的错误:

 

解决方案

1. Run dcomcnfg to bring up Component Services window.

2. Expand Component Services > Computers > My Computer > DCOM Config

3. Scroll down list, right click Windows Management and Instrumentation, and select properties. A 5 tabbed window named Windows Management and Instrumentation Properties should be displayed.

4. Select the Security tab, then select radio buttons which activate the Edit... buttons.

5. Select the appropriate location and add the ASPNET account.

6. Reboot.

简单一点就是:

1) 运行dcomcnfg

2) 点击 组件服务->服务->电脑->我的电脑->DCOM 配置

3) 找到“Windows Management and Instrumentation”,右击属性--安全--编辑--ASPNET用户权限添加进去

4) 重启电脑


猜你喜欢

转载自blog.csdn.net/yao940622/article/details/79306322