开发者

How to find the root cause for some Access Denied error on a windows machine?

I was wondering if there is a way to discover the exact reasons for an Access Denied error on a windows box.

For instance, I have this code that crashes with Access Denied on Win2008R2 when it runs unelevated. I was hoping that ProcMon will tell me exactly which resource denied access - it did not, although I did not filter the events.

So, I am a bit lost - how on earth am I supposed to troubleshoot it?

For the reference, the code I am trying to run is ICertAdmin2.ResubmitRequest. It runs OK elevated, but fails with Access Denied when ran unelevated:

System.UnauthorizedAccessException: CCertAdmin开发者_如何转开发::ResubmitRequest: Access is denied. 0x80070005 (WIN32: 5)
   at CERTADMINLib.ICertAdmin2.ResubmitRequest(String strConfig, Int32 RequestId)

Thanks in advance to all the Good Samaritans out there.


ProcMon wont, but filemon probably would. It tells you the success/denies and the searches.

Chances are its trying to write to program files (but not limited to that) but filemon will tell you


The error code you're getting looks like a COM HRESULT error code. All these have a specific meaning. Have a look here to find out more how to interpret them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜