Issue with network permissions

Apr 3, 2009 at 6:29 PM
Wonderful tool.  I did run into one problem, not so much a code issue (which is why I did not enter it into the Issue Tracker).  My computer happens to be setup that the "My Documents" directory is on a network share.  Because of this, loading the DLLs from the scripts directory gets a permission denied error:
System.TypeInitializationException: The type initializer for 'WatcherEngine.Watcher' threw an exception. ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config) ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.


The solution for this was to grant FullTrust in the .Net 2 configuration tool:
http://support.microsoft.com/?id=320268

Hope this helps someone out,

Dave



Coordinator
Apr 3, 2009 at 9:12 PM
Edited Apr 3, 2009 at 10:10 PM
Thanks for the feedback Dave!  I suppose the alternative would be installing Watcher for all users under the program files directory but that requires admin rights.   FYI we have an update planned for release next week, and we may investigate workarounds for this issue after that.  This seems to be default .Net behavior and I don't know anything that we could do in code other than having the installer grant full trust, which seems dangerous.