Security Exception

  • Thread starter Thread starter Lews
  • Start date Start date
L

Lews

Guest
Hi!

In a thread, I create a class and initialize it. When I run a method on the class I get this error:


An unhandled exception of type 'System.Security.SecurityException' occurred in printandreply.dll

Additional information: System.Security.Permissions.SecurityPermission


I think this is because the class I create from the thread isn't considered to be thread safe. How do I solve this?




Thanks

Lews
 
I don't think you'd get that error because it wasn't thread safe. You could try adjusting your .net security settings under control panel. Is it located on a network share by any chance? They have lower security permissions by default.
 
I tried moving the operation to the same class as the thread... Didn't help...

I tried moving the project from a network dir to the local harddrive... Didn't help...

I was not able to find the .net security settings. Which control panel are you referring to?
 
Control Panel -> Administrative Tools

Don't run .net assemblies from network shares without changing these security settings, most things just won't work.
 
Back
Top