I am getting a access denied exception. How can I fix this?
Here is the exception:
System.UnauthorizedAccessException was unhandled HResult=-214
Double click on app.manifest file and if app.manifest not present Right click on your project, add -> New Item -> Application Manifest File then replace this line
app.manifest
with this
It will run your application with administrator privileges.