473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Security Permission system.security.permissions.securitypermission

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

Jun 28 '06 #1
6 5674
Check again your NTFS security setting just in case any changes have
occurred.

chanmm

"alex" <ea***********@freenet.de> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...
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

Jun 28 '06 #2
alex wrote:
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?

--
Hope this helps,
Tom Spink
Jun 28 '06 #3
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

Tom Spink schrieb:
alex wrote:
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?

--
Hope this helps,
Tom Spink


Jun 30 '06 #4
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

Tom Spink schrieb:
alex wrote:
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?

--
Hope this helps,
Tom Spink


Jun 30 '06 #5
alex wrote:
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

Tom Spink schrieb:
alex wrote:
> 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?

--
Hope this helps,
Tom Spink


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?

--
Hope this helps,
Tom Spink
Jun 30 '06 #6
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(Obj ect
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.Run UsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context( Object
state)
bei System.Threading.ExecutionContext.runTryCode(Objec t
userData)
bei
System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData)
bei
System.Threading.ExecutionContext.RunInternal(Exec utionContext
executionContext, ContextCallback callback, Object state)
bei System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()


Tom Spink schrieb:
alex wrote:
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

Tom Spink schrieb:
alex wrote:

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?

--
Hope this helps,
Tom Spink

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?

--
Hope this helps,
Tom Spink
Jul 3 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chua Wen Ching | last post by:
Hi there, I had applied this security permissions in my class library based on fxcop standards. Before namespace: using System.Runtime.InteropServices; using System.Security.Permissions;
3
by: Velvet | last post by:
I ran FxCop on one of the components for my web site and the security rules what me to add " tags like the ones listed below: This breaks my ASP.NET application. So my question is,...
3
by: Carl | last post by:
Hi. I have my program written as a console application in C# .NET 2005. I run it from a server on the local intranet and I got this message: An unhandled exception of type...
0
by: Filippo Bettinaglio | last post by:
Security problem running unmanaged code (.ocx control) in a windows from control hosted in IE6 Hi, I have design a windows from control which contain a .OCX in one of its forms....
2
by: Nick | last post by:
Is there a way to do declarative security on abstract classes? I am working on a data access layer and would like to place all permission requirements on the base class so all inherited classes...
0
by: Lambuz | last post by:
Hi all, I've got this problem. I've to implemente a solution like the example in http://support.microsoft.com/default.aspx?scid=kb;EN-US;313891, but I can't configure correctly the example. ...
2
by: Budhi Saputra Prasetya | last post by:
Hi, I managed to create a Windows Form Control and put it on my ASP .NET page. I have done the suggestion that is provided by modifying the security settings. From the stack trace, I would...
0
by: Kevin | last post by:
I have an app that frequently gets updated. These people want changes it seems every week. In VB6 I installed the program on all workstations. When a change was made, all I had to do was compile...
1
by: fireline1082 | last post by:
HI ALL PLEASE HELP ME. I am stuck on this point and can't do any progress in my project. Currently, I am using Domain Environment. I have Active directory and I want every users when they...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.