What should I do when "access is rejected" is reported on the page?

Source: Internet
Author: User
Tags asp net
ArticleDirectory
    • Use System. Management and WMI

Error: (Access denied)

========================================================== ==========================================

In system. Management. managementexception. throwwithextendedinfo (managementstatus errorcode)

In system. Management. managementscope. initializeguts (Object O)

In system. Management. managementscope. initialize ()

In system. Management. managementobject. initialize (Boolean GetObject)

In system. Management. managementclass. getinstances (enumerationoptions options)

In system. Management. managementclass. getinstances ()

In a7.a ()

In a7. B (string a_0)

In a7.a (licensecontext A_0, type A_1, object A_2, Boolean A_3)

In system. componentmodel. licensemanager. validateinternalrecursive (licensecontext context, type, object instance, Boolean allowexceptions, license & license, string & licensekey)

In system. componentmodel. licensemanager. validateinternal (type, object instance, Boolean allowexceptions, license & License)

In system. componentmodel. licensemanager. Validate (type, object instance)

In bingosoft. workflow. providers. organizationprovider. get_defaultprovider ()

In infoweb. waygoextension. toworkflowuser (iuser wuser)

========================================================== ==========================================

Fault Cause:

This error is caused by the fact that the asp net account accessing the site does not have the permission to access the server device information.

Solution: (from the listener. Net blog)

========================================================== ==========================================

Use System. Management and WMI

Windows Management Instrumentation (Wmi) provides powerful management functions that you can use to manage and monitor Windows-based computers. However, when ASP. NET ApplicationsProgramWhen running with an ASPNET account, this account only has the same default access permissions as the "everyone. These permissions include reading WMI data, writing provider data, and executing methods for the provider on the local computer. For more information about the WMI security mechanism, see the WMI Platform SDK documentation or msdn.
Note:: On Windows 2000 without Service Pack 3 (SP3) or later, or on Windows XP without Service Pack 1 (SP1) or later, ASP.. NET web applications may fail to run, and you may receive an error message "Access Denied (0x80041003)" (Access Denied (0x80041003. This error occurs because the account does not have sufficient permissions to access certain WMI namespaces. To solve this problem, install Windows XP SP1 or later, or install Windows 2000 SP3 or later. To solve this problem, follow these steps:

1.

Open the Computer Management Microsoft Management Console (MMC) Management Unit.

2.

ExpandServices and ApplicationsAnd then selectWMIControl.

3.

Right-clickWMIControlAnd then clickAttribute.

4.

InWMIControl attributesIn the dialog box, clickSecurityTab.

5.

ExpandRoot directory, SelectCimv2And then clickSecurity.

6.

InSecurityIn the dialog box, clickAdvanced.

7.

InAccess control settingsDialog box, clickAdd. SelectLocal Computer Name\ Network ServiceAnd then clickOK.

8.

InPermission ProjectIn the dialog box, make sure thatApplySetThis namespace and sub-namespace.

9.

Ensure selectedAllow 'Enable account'(Allow "enable account") andAllow 'remote enable'(Enable remotely) check box.

10.

ClickOKUntilWMI Control Properties(WMI control properties) dialog box.

11.

Repeat steps 5th to 10th for other WMI namespaces accessed by your application.

12.

Restart IIS. Therefore, run iisreset from the command line.

By default, ASP. NET generates a password with strong confidentiality for the ASPNET account. Therefore, this alternative method is secure as long as the ASPNET account password is not shared between computers or is reset to a non-default value.

========================================================== ==========================================

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.