System.Management.ManagementException: Access denied

I received this error when I was working on one of my application.

 

If EPiServer throws a management exception with error message “Access Denied” the cause is that ASPNET account does not have enough privileges to access certain WMI namespaces.

 

This is a bug that has been fixed in Windows 2000 Service Pack 3 and Windows XP Service Pack 1.

 

To resolve this issue I followed below steps

 

*     Install Windows XP SP1 or Windows 2000 SP3. (The problem has been seen on Windows XP with SP2 so installing a service pack is not a guaranteed solution)


     

      OR

       

*     Follow these steps:

 

1.     Open the Computer Management Microsoft Management Console (MMC) snap-in.

 

2.     Expand Services and Applications, and then select WMI Control.

 

3.     Right-click WMI Control, and then click Properties.

 

4.     In the WMI Control Properties dialog box, click the Security tab.

 

5.     Expand Root, select CIMV2, and then click Security.

 

6.     In the Security dialog box, click Advanced.

 

7.     In the Access Control Settings dialog box, click Add. Select localMachineName\ASPNET, and then click OK.

 

8.     In the Permission Entry dialog box, make sure that Apply Onto is set to This namespace and subnamespaces.

 

9.     Make sure that the Allow ‘Enable Account’ and Allow ‘Remote Enable’ check boxes are selected.

 

10.   Click OK in each dialog box until you return to the WMI Control Properties dialog box.

 

11.   Repeat steps 5 through 10 for other WMI namespaces that your application will access.

 

12.   Restart IIS. To do this, run IISRESET from the command line.” permissions both on ROOT and CIMV2.

 

Troubleshooting

 

If neither of these solutions work you can give “Everyone” the same permissions as the ASPNET account as described above to get the system up and running and then try to find out which account the ASP.NET process is actually running under.

 

Source:

Microsoft Support

http://support.microsoft.com/default.aspx?scid=kb;en-us;317012&Product=aspnet#5m


by admin on December 6th, 2009 in ASP.Net

There are no comments.

Name*: Website: E-Mail*:
XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>