Answered by:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Question
-
I created a simple page that uses a web reportviewer control to display a server report located on a different server. For now, I've have made it possible to access the report through anonymous access. All works when I run the page on my localhost. I receive the following when I run the page on the development web server.
I might be missing the obvious, but what resource is the message referring to?
Server Error in '/IcpReports' Application.
--------------------------------------------------------------------------------Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
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 is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
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 <identity impersonate="true"/>, 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.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Management.ManagementScope.InitializeGuts(Object o) +785
System.Management.ManagementScope.Initialize() +216
System.Management.ManagementObjectSearcher.Initialize() +146
System.Management.ManagementObjectSearcher.Get() +34
Microsoft.ReportingServices.Diagnostics.WebUtil.GetIPAddresses(String machine) +273
Microsoft.ReportingServices.Diagnostics.WebRequestUtil.get_LocalIPAddresses() +138
Microsoft.ReportingServices.Diagnostics.WebRequestUtil.IsLocalIPAddress(String ipAddress) +37
Microsoft.ReportingServices.Diagnostics.WebRequestUtil.IsClientLocal() +79
Microsoft.Reporting.WebForms.ErrorControl.WriteStackTrace(HtmlTextWriter writer) +10
Microsoft.Reporting.WebForms.ErrorControl.Render(HtmlTextWriter writer) +43
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
Microsoft.Reporting.WebForms.ReportViewer.Render(HtmlTextWriter writer) +248
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42Monday, April 17, 2006 1:46 PM
Answers
-
The solution:
- On the web server, identified GUID 8BC3F05E-D86B-11D0-A075-00C04FB68820 in the registry as the Windows Management Instrumentation service.
- Ran dcomcnfg from the command prompt.
- Selected Windows Management Instrumentation from the list of services.
- Updated custom permissions by adding ASPNET account from the Security tab.
- Reboot the server.
Hope this works for you. It did for me.
Tuesday, April 18, 2006 6:00 PM -
I made the above changes on Win2000 Server, but I did retrace my steps on a Win 20003 server:
- Run dcomcnfg to bring up Component Services window.
- Expand Component Services > Computers > My Computer > DCOM Config
- 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.
- Select the Security tab, then select radio buttons which activate the Edit... buttons.
- Select the appropriate location and add the ASPNET account.
- Reboot.
You should be good to go.
Tuesday, May 2, 2006 4:43 PM
All replies
-
The solution:
- On the web server, identified GUID 8BC3F05E-D86B-11D0-A075-00C04FB68820 in the registry as the Windows Management Instrumentation service.
- Ran dcomcnfg from the command prompt.
- Selected Windows Management Instrumentation from the list of services.
- Updated custom permissions by adding ASPNET account from the Security tab.
- Reboot the server.
Hope this works for you. It did for me.
Tuesday, April 18, 2006 6:00 PM -
We got the same error. We are running the SQL server SSRS on Win 2003 server SP1. We couldn't find the security tab to "updated the custom permissions by adding ASPNET account from the security tab". Please help.
Thanks lot.
Monday, May 1, 2006 8:44 PM -
I made the above changes on Win2000 Server, but I did retrace my steps on a Win 20003 server:
- Run dcomcnfg to bring up Component Services window.
- Expand Component Services > Computers > My Computer > DCOM Config
- 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.
- Select the Security tab, then select radio buttons which activate the Edit... buttons.
- Select the appropriate location and add the ASPNET account.
- Reboot.
You should be good to go.
Tuesday, May 2, 2006 4:43 PM -
Hi, great info. But some environments may be using windows authentication with impersonation turned on like my environment.
I did a trace to make certain my domain account is being used to do the wmi query, and it is. The domain account is also a member of the server's local administrators group. For those devs that aren't using the aspnet account any suggestions? Other than running dcomcnfg on the servers (we have about 6 and 10 users). Thanks.
Monday, July 23, 2007 5:58 PM -
When ever i try to create a Infopath template in Visual Studio 2005, i get the same error.
When I select the template to create a project, i can see the studio adding all the references and also creating files, but before it can complete i get this error and everything is rolled back. Can someone help me on this.Friday, August 31, 2007 8:29 AM -
I'm getting this error when I try to connect to SQL Server Reporting Services. I also get a similar error when I
run SQL Server Configuration Manager.
I'm running SQL Server 9.0.3159 on vista Ultimate.
Can anyone help?
Tuesday, October 16, 2007 10:19 AM -
Ok, useful information but, how about when there is no Security Tab.
I am running IIS7 on Vista and receiving Permission Denied to change some properties on my Application/Sites.
Thanks.
- Proposed as answer by Amrit jain Tuesday, June 4, 2013 7:03 AM
- Unproposed as answer by Amrit jain Tuesday, June 4, 2013 7:03 AM
Wednesday, April 23, 2008 1:22 PM -
I'm having this problem with Norton Ghost 12, when i try to connect from my server to my computer it used to say something about an RPC server but it now says (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED). Anybody have any idea why?
Thanks
Sunday, April 27, 2008 4:12 AM -
I have had the exact same problem with Norton Ghost 12... same error you listed. Did you determine a fix?
thanks... patc- Proposed as answer by Luis Botero Tuesday, December 2, 2008 2:18 PM
Tuesday, July 29, 2008 8:16 PM -
I have ran into the same scenario and what I see is a thread abort that causes the app to stop. What I have done, since I am iterating through all itemsof a SPItemCollection is the following:
SPFieldCollection fields = item.Fields; int counter = 0; int totalFields = fields.Count; ThreadStart thread = delegate { while (counter < totalFields) { Microsoft.SharePoint.SPField itm = fields[counter]; // I do my logic here counter++; } }; // Need to get fields in a separate thread b/c there's an access denied exception // in some occations where it'll abort the current thread. do { var handle = thread.BeginInvoke(null, null); handle.AsyncWaitHandle.WaitOne(); counter++; } while (counter < totalFields); - Proposed as answer by Luis Botero Tuesday, December 2, 2008 2:24 PM
Tuesday, December 2, 2008 2:23 PM -
ljcorreia said:
Ok, useful information but, how about when there is no Security Tab.
I am running IIS7 on Vista and receiving Permission Denied to change some properties on my Application/Sites.
Thanks.
Same problem:I am running Windows Vista and IIS7. I get the above error when I click anywhere on the IIS manager. Add Application/Add Virtual Directory etc. This used to work couple days ago. I am not sure what changed.
I do not see any security tab in the Properties window on following the above steps.
Where do I look next?
Saturday, January 24, 2009 12:56 AM -
I also have the same proble when trying to start web-services on IIS Manager in Vista. Get this error when trying to start web-services: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Also not able to run build server using Visual Web Developer.
I have tried the avove suggestions without sucess.
Any suggestion is appreciated.Monday, June 29, 2009 5:36 AM -
In My Scenario:
I m using VS2008 Pro.
My visual studio crashed and restarted then I started to get this error.
I have spent about an hour on the net for finding resolution but i could notI have check the task manager and there were two devenv.exe process. I closed my VS and I killed the other exe.
Then I have opened again and it is building correctly.
Your case could be different
Thursday, April 29, 2010 8:11 AM -
here is some great advice for this problem 0×80070005
good luck!
http://types-of-snakes.blogspot.com/Tuesday, November 16, 2010 9:26 PM -
here is some great advice for this problem 0×80070005
good luck!
http://types-of-snakes.blogspot.com/
Icemannn,The link you provided appears to be nothing more then an ad for driver software. I find it troubling that a technical problem such as Mike's receives such a simple response geared towards profiting off the forums. Please, try to provide more useful information in the future.
If you want to sell software do it somewhere else, the Internet has enough ads without adding them here.
Very Respectfully,
Robert
Sunday, April 17, 2011 4:03 PM -
The solution:
- On the web server, identified GUID 8BC3F05E-D86B-11D0-A075-00C04FB68820 in the registry as the Windows Management Instrumentation service.
- Ran dcomcnfg from the command prompt.
- Selected Windows Management Instrumentation from the list of services.
- Updated custom permissions by adding ASPNET account from the Security tab.
- Reboot the server.
Hope this works for you. It did for me.
Sunday, January 15, 2012 7:53 AM -
IIS7.. I downloaded a windows process monitor and could see when adding the certificate that there was a file name collision (no idea why it doesnt use a different tmp file name!).. if you delete the file causion the collision, and re-run adding the certificate, it should finally work!
- Edited by hal1on Friday, February 8, 2013 5:57 PM
Friday, February 8, 2013 5:56 PM -
I have the same issue. My setup has a hourly automated health check mail pushed from HPOO and it gets the details from the monitored servers and sends out a mail but recently I am receiving the following error.
Error
{Result=;returnResult=Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED));returnCode=1;StdErr=;ReturnCode=;sessionId=d8c3d694-f9bd-47ac-a65b-45bc10f7a1db;exception=System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at dotNET_Commons.WMI.WMISearch(String strHost, String strNameSpace, String strQuery, String strUser, String strPass, ImpersonationLevel il, AuthenticationLevel al, String locale) at dotNET_Commons.WMI.WMISearch(String strHost, String strNameSpace, String strQuery, String strUser, String strPass) at dotNETWebActions_RemoteExecution.RemoteExecution.Execute(ActionRequest req, ISession s, IActionRegistry reg);StdOut=;}
Can anyone help me on this.
--
Jagannath.C
+91 9962 543 420
Saturday, July 27, 2013 6:45 AM -
I am running Windows 7, and I also am not getting the Security Tab on my Windows 7 machine.
Does anybody have a workaround for this?
Wednesday, July 2, 2014 2:03 PM -
OK, I was stupidly accessing the service from the Services branch and not the entry in DCOM Config branch. I will leave this here in case others make the same mistake.Wednesday, July 2, 2014 2:35 PM
-
>The solution....
>Selected Windows Management Instrumentation from the list of services.Updated custom permissions by adding ASPNET account from the Security tab.
I'm sorry but I don't understand this solution. When I select the service I can stop, start, check properties, but not add any ASPNET account. Could you please clarify how to do this step. Thank you
Monday, September 8, 2014 9:40 PM -
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
It occures when using Firewall that is outside Windows own Cloud that will own ROOT certificate that Microsoft has not proofed.
If you use firewall or virus protection soft ware to protect your cloud based system you will see this error report a lots.
Wednesday, January 25, 2017 10:30 AM