Security Permission system.security.permissions.securitypermission

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

Hi,
this always works:

private ConsoleToTextbox myConsole;
Console.SetOut(myConsole);

But now (a few weeks later i started this project again)
i get a non handeld security exception
from system.security.permissions.securitypermission
when i try to run the program.
recompile is successfull

what the hell has been changed?

Thanks for help
Alex
 
Check again your NTFS security setting just in case any changes have
occurred.

chanmm
 
alex said:
Hi,
this always works:

private ConsoleToTextbox myConsole;
Console.SetOut(myConsole);

But now (a few weeks later i started this project again)
i get a non handeld security exception
from system.security.permissions.securitypermission
when i try to run the program.
recompile is successfull

what the hell has been changed?

Thanks for help
Alex

Hi Alex,

Have you changed the location of your project, e.g. to a network drive?
 
My project is on a network drive.
I have full contorl of all subfolders.
I changed the security settings in the project to full trusted
application.
But nothing changed. Now i will try to build and runt the project from
a local drive.

Alex
 
My project is on a network drive.
I have full contorl of all subfolders.
I changed the security settings in the project to full trusted
application.
But nothing changed. Now i will try to build and runt the project from
a local drive.

Alex
 
alex said:
My project is on a network drive.
I have full contorl of all subfolders.
I changed the security settings in the project to full trusted
application.
But nothing changed. Now i will try to build and runt the project from
a local drive.

Alex

Hi Alex,

I have a nasty feeling CAS is playing some part in your tragedy. Has your
attempt to compile/execute on a local drive worked?
 
Hi Tom,
on a local drive, all works correct...
But is there any option (perhaps in assembly settings of .NET
framework)
to make this functional on a network drive too?

Thanx for help
Alex


Security exception:
System.Security.SecurityException wurde nicht behandelt.
Message="Fehler bei der Anforderung des Berechtigungstyps
System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089."
Source="mscorlib"
StackTrace:
bei System.Security.CodeAccessSecurityEngine.Check(Object
demand, StackCrawlMark& stackMark, Boolean isPermSet)
bei System.Security.CodeAccessPermission.Demand()
bei System.Console.SetOut(TextWriter newOut)
bei SitCommander.Form1..ctor()
bei SitCommander.Program.Main()
bei System.AppDomain.nExecuteAssembly(Assembly assembly,
String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
bei
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
bei System.Threading.ExecutionContext.runTryCode(Object
userData)
bei
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
bei
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top