Rahul Soni's blog

Never assume the obvious is true!

Using Filemon/Regmon to solve "Access Denied" issues

Using Filemon/Regmon to solve "Access Denied" issues

  • Comments 5

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 http://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx and 
--- Download Regmon from
http://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.

  • 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
  • Hi, I am Rohit Soni working in Britsh Telecommunication Pvt. Ltd. I have made software in ASP and MS Access it is working fine in my local (off line) machine. But When I upload on server (on line) connection between MS Access and ASP is not working. Could you shed light on this problem.

    With Regards

    Rohit Soni

  • 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

  • Thanks Amit.

    I've done it :)

  • Looks like they changed the URL again.

    http://technet.microsoft.com/en-us/sysinternals/bb896652.aspx

Page 1 of 1 (5 items)
Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post