Visual Studio c# Xml File Permissions
I need to find a way to determine if a user have permissons to access a document from either a url or a local directory. How would I go about checking their permissions IE what method would I use? If it helps or makes a difference what so ever I am pulling the addresses out of an XML file as a string and running each individual node pertaining to location.
Edit: The goal is to Filter the Xml file to display if the user has access to the file.
The simplest and most effective way is to simply try to access the file. If the user doesn’t have permission you’ll get an exception (UnauthorizedAccessException).
Trap that (and any other specific exception that could be raised) and display a suitable error message.