I have created a software product, that acts like the Apache mod_rewrite, but for .NET. One of the requirements is to support the RewriteLog command which sets a path for logging. This works fine, however the biggest issue I run in to is that users set a path that the IIS user doesn't have access to.
I would like to throw an exception to the user about the lack of write access, by checking the permissions of the path to make sure write access is available.
I have already figured out that I can trying write a file to the hard disk to test. But this seems hacky and I would like to find a non-hacky way of doing this? Anybody know of some API that I can call that is Medium-Trust safe to check the file permissions for write access?