Questions tagged [code-access-security]

Code-access security is security specific to limiting access to or protecting source code, through the use of processes such as encryption, obfuscation, and more.

Code-access security is security specific to limiting access to or protecting source code, through the use of processes such as , , and more. The goal of code-access security is most often to protect functionality from competitors, to prevent reverse-engineering, or to preserve integrity of program communication protocols.

For more on obfuscation:

Note that security questions which are not about a specific programming problem may be better suited to our sister site, IT Security Stack Exchange.

337 questions
4
votes
2 answers

.net 4.0 with Code Access Security NetFx40_LegacySecurityPolicy won't work

I'm trying to use an external library DevExpress.XtraTreeList.v8.1.dll in my vsto office addin built using VS2010 beta 2. I am getting the following compile time error: DevExpress.Utils.AppareanceObject threw an exception -->…
4
votes
2 answers

Anyone really using Code Access Security to protect their assemblies and/or methods?

Seems to me most of developers completely ignore this features. People prefer handling security exceptions as generic ones relying on standard windows roles and rights instead of learning to use CAS ways of enhancing security - probably because CAS…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
4
votes
2 answers

Is is possible to see the code for shiny glimmer apps

Hi this is more question of code security, rather than a question about a directly coding related problem. But I was wondering is it possible to see the code in ui.R and the server.R and that generates the app web browser page? e.g. Although I'm…
h.l.m
  • 13,015
  • 22
  • 82
  • 169
4
votes
1 answer

Implementing IPermission for custom code access security

I'm currently trying to build a custom code access security solution for our project. Therefore i created a CustomPermissionAttribute which should be used as shown: [CustomPermissionAttribute(SecurityAction.Demand,…
Christian
  • 143
  • 8
3
votes
3 answers

Fixing CA2122 with Process.Start

In an application we can output a report as a csv file and load it up similar to the following code: Process.Start("C:\MyReport.csv") ' Not real path When running code analysis it produces the following error: CA2122 Do not indirectly expose…
Stuart Blackler
  • 3,732
  • 5
  • 35
  • 60
3
votes
1 answer

Are trust levels in ASP.NET 4.0 obsolete?

Microsoft introduced a new security model on .NET 4.0 and above which is a replacement for code access security. Since trust levels are code access security, is this approach obsolete? If above statement is in the right way, how do you define a…
Matías Fidemraizer
  • 63,804
  • 18
  • 124
  • 206
3
votes
2 answers

Web App works on localhost but fails on remote connection

We have a new ASP.NET web application we are deploying that uses a separate DLL which we also built which in turn interrogates the Active Directory for simple user and group membership information. The server is Windows Server 2003. The application…
AjarnMark
  • 43
  • 1
  • 5
3
votes
1 answer

Debugging TrustNotGrantedException in VSTO word addin

I'm getting TrustNotGrantedException thrown for some specific users of our VSTO word addin. These users have the certificate installed correctly. The exception is being thrown when the app checks for updates: try { …
woggles
  • 7,444
  • 12
  • 70
  • 130
3
votes
2 answers

System.MethodAccessException, CAS and Visual Studio debugger

I am calling ModelMetadataProviders.Current.GetMetadataForProperties to fetch list of ModelMetadata in WPF application with Visual Studio 2010. This call executes fine and I get IEnumerable<> in return. At the code line, where I try to iterate over…
isntn
  • 1,208
  • 10
  • 22
3
votes
1 answer

Call protected generic method via .NET reflection within derived class

recently I was trying to do something like this in WP7 app I have class abstract class A { //this method has an implementation protected void DoSomething(Func func) { //impl here } }; and I want to invoke that protected method via…
Robert
  • 3,276
  • 1
  • 17
  • 26
3
votes
1 answer

C# 3.5 winforms app upgraded to C#4.0 issue because of the exclusion of CAS

I have a C# 4.0 Winform app that I just upgraded from 3.5 to 4.0. The C# 4.0 Winforms app references a C# 3.5 dll that will load a series of dlls from network paths based off of user selections and then create/invoke the dlls using…
Mark Harrington
  • 308
  • 4
  • 10
3
votes
1 answer

What is the state of the .NET security model (CAS) as of .NET 4.5?

The desktop .NET Framework has supported Code Access Security (CAS) for a long time but there have been plans to phase out this security model I believe. Is CAS still fully working and supported as of .NET 4.5? Further, is it considered secure or is…
boot4life
  • 4,966
  • 7
  • 25
  • 47
3
votes
0 answers

.NET Security-Transparent Code, Level 2 & Permissions

Reading docs/prototyping and it seems I do not understand the big picture in the new .NET 4 security model. Ok, I understand and even prototyped the 3-layer security model (transparent code, security-safe-critical code, and security-critical code).…
Tom3m
  • 81
  • 5
3
votes
2 answers

Any example for Security of .Net Desktop application

Is it possible to prevent any unauthorised user to access code or application in desktop application like any web application? Thanks in advance.
Brijesh Patel
  • 2,901
  • 15
  • 50
  • 73
3
votes
1 answer

How can I use CAS in .NET 4 to lock down my MEF extensions?

I have an application in .NET 4 that uses MEF for extensibility. My main application has three assemblies: Host, Application and Contracts. Host is the "boot-strapping" executable that creates the container and does the composition. Application…
Scott Whitlock
  • 13,739
  • 7
  • 65
  • 114