次の方法で共有


Using Filemon/Regmon to solve "Access Denied" issues

Very often you get "Access Denied" error messages in your .NET application and you wonder why it is throwing up and how do you troubleshoot it?? Here we will discuss the 1-2-3 steps for how to use Filemon/Regmon to troubleshoot Access Denied error messages?

So, first of all you need to download two tools called File Monitor and Registry Monitor

--- Download Filemon from https://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx and
--- Download Regmon from https://www.microsoft.com/technet/sysinternals/utilities/regmon.mspx

--- Run Filemon and Regmon and reproduce your error

--- Once the error is reproduced, you need to Open Filemon and Regmon one by one and click on File -> Capture Events (or press CTRL + E) to check it Off. By default, it is on and it captures everything. CTRL + X clears the complete logs in the Filemon & Regmon

--- Now, save the Filemon and Regmon logs and open them in Excel (right click on the file -> Open With MS Excel)

--- In the Excel window select the menu, Data -> Filter -> Autofilter

--- Drop down column F and see if you have any Access Denied listed (select it if you have!)

--- At this point you should be seeing only those rows which contains Access Denied. Column E will show the resource and Column G will show you the account on which the Access Denied has been thrown.

--- Grant the permissions accordingly and try reproducing the issue. There is a high probability that your issue would be fixed. (You might need an IISReset or Reboot depending on the resource)

NB: It is not necessary that you run filemon and regmon simultaneously.

Comments

  • Anonymous
    January 18, 2006
    Actually I have done this many time for purchased apps. One App in particular Altiris is notorious for doing things like this. Most recently One of thier web plugins wouldn't work, so the admin of the servers came and got me, the plugin worked for him and other admins but no one else, instantly obvious to all of us that it was a permissions issue, but where.

    He had called their support. They were trying to figure it out for over a week. To which I fired up filemon on the server and hit the webpage. Sure enough for some dumb reason they were trying to store something in an xml file under App Settings for All Users which of course the people logging in from a web page did not have write permissions too. Unfortunately we had to give them write permissions to this one specific xml file but still why a programmer of a web piece would want you to allow everyone write access to the C drive and then just assume you would give it to them. I haven't checked back with the admins to see if they ever did fix that but I know there were other wacky things they did. Anyway this could have been months for them trying to figure out without filemon. This is definately a good tip for people that might not think about using it in that way, thanks for posting it

  • Anonymous
    November 26, 2006
    The comment has been removed

  • Anonymous
    March 27, 2007
    Hey Rahul, Please change the Filemon and Regmon URL's. http://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx http://www.microsoft.com/technet/sysinternals/utilities/regmon.mspx

  • Anonymous
    March 27, 2007
    Thanks Amit. I've done it :)

  • Anonymous
    February 05, 2008
    Looks like they changed the URL again. http://technet.microsoft.com/en-us/sysinternals/bb896652.aspx