How can I locally debug file permission issues in Visual Studio?

Posted by robertc on Stack Overflow See other posts from Stack Overflow or by robertc
Published on 2010-06-08T11:07:35Z Indexed on 2010/06/08 11:12 UTC
Read the original article Hit count: 176

I want to debug an ASP.Net website as it attempts to write a file to a directory.

When actually deployed this file would possibly not be writeable by the worker process so an error would be thrown, this is not a problem as I just want to catch the error, inform the user and move on.

Of course, if I'm debugging on my local machine then I'm an administrator and I have permission to write to the file, so I can't check that I've trapped the correct errors and I can't step through an see where it goes wrong if I haven't. Is there a standard approach to this sort of thing?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about visual-studio-2008