C# .NET - Accessing WMI with ASP.NET without impersonation
Asked By Brandon Schave on 30-Apr-13 06:22 PM
I have an SSRS server that I am trying to connect to which is on server A. I have a asp.net web application (which has anonymous access because we use forms authentication) that is trying to connect to it on server B. The web application is using WMI to access the server, but is returning a "access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" error.
I read online that all I needed to do was go on to:
server a -> go into the component services -> computer -> DCOM Config -> WMI -> right click -> go to properties -> click on security tab and add network service with remote access. Then I restarted the server.
I did all of that, but I still keep getting the same error. I was then thinking, well don't I need to add the machine name before the account? Well, I can't do that because the domain doesn't recognize that machine.
This doesn't seem that complicated. Is there something I am missing?
Brandon Schave replied to Robbe Morris on 01-May-13 10:41 AM
WMI is what the custom security extension uses to communicate with the report server. My requirements are to create an accessible external ssrs server that is forms authenticated. I thought that the app ran under the the network service account?
The issue is that I have to pass in parameters to the reports that the user cannot see. I therefore am logging in to the report server from code behind to get the report list, which will then push to a reportviewer page. The page with the reportviewer control will pass in the parameters to the report behind the scenes. Is there another way to do it that doesn't involve windows authentication?