c# in .net
-
:doh:I am new to C# and .Net. I am trying to execute a bat file from inside a C# application. I continue to get a security error and no one here can help me out. Any ideas? Thanks in advance. tom
Don't cross post for a start. You've already had several replies, mine included.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
-
Don't cross post for a start. You've already had several replies, mine included.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Well. I was told here that this may be a .net security issue. Here is my error message: Unhandled Exception: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at ConsoleApplication_uisftp.HelloWorld.Main() The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The demand was for: The granted set of the failing assembly was:
-
Well. I was told here that this may be a .net security issue. Here is my error message: Unhandled Exception: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur ityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec t assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs , PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet hodHandle rmh, Assembly asm, SecurityAction action) at ConsoleApplication_uisftp.HelloWorld.Main() The action that failed was: LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The demand was for: The granted set of the failing assembly was:
For a start try running it under an admin account if you can, if that succeeds then it's your permissions that are at fault. Otherwise it's something else which I'm not sure of without looking it up.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9