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
7
votes
2 answers

Canvas drawImage does not draw in Cordova, security issue?

I want to draw an image to canvas within a Cordova app. When the image path is within the www directory of my app, the drawing works as expected. However, if the image is made by the Cordova camera and is thus stored in ../../tmp in relation to the…
Clawish
  • 2,934
  • 3
  • 24
  • 28
7
votes
0 answers

Intermittent PolicyException: Execution permission cannot be acquired

We are intermittently seeing the following exception shortly after an App Pool recycle in an ASP.NET application: System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Web.Mvc, Version=1.0.0.0,…
Aaron Maenpaa
  • 119,832
  • 11
  • 95
  • 108
6
votes
2 answers

Throwing Exception with inner SecurityException only displays inner exception in ASP.NET MVC

If I add the following line to an ASP.NET MVC action method throw new Exception("outer", new SecurityException("inner")); the error that is actually displayed on the yellow screen of death is the inner SecurityException with absolutely no mention…
Paul Hiles
  • 9,558
  • 7
  • 51
  • 76
6
votes
1 answer

Confusion regarding code access security with unverifiable code

I am confused about what I need to do in order to correctly "set up" my unverifiable method so that it conforms to code access security guidelines. Given the following method [MethodImpl(MethodImplOptions.ForwardRef)] private extern void…
Thomas Flinkow
  • 4,845
  • 5
  • 29
  • 65
6
votes
1 answer

How to allow a SQL CLR function to run in parallel query plan and also have data access permissions

I have a written a number of SQL CLR functions (UDF) that reads data from an external DB2 database hosted on an IBM iSeries (using IBM DB2 .Net Provider). So that the function has the necessary permissions to read this data, I need to decorate the…
Kev
  • 1,832
  • 1
  • 19
  • 24
6
votes
1 answer

App crashing when converting to .NET 4 (also binding for XML assembly failing)

I have a solution that I'm trying to convert to .NET 4 from .NET 2. There are multiple projects in this solution, some of which are in C# and some of which are in VB. Most of them use system.xml for XML creation and parsing. I've re-targeted all…
teleute00
  • 561
  • 6
  • 25
6
votes
3 answers

How do I implement Exception.GetObjectData in .NET 4 in a library assembly that has the AllowPartiallyTrustedCallersAttribute?

I have an assembly marked with the AllowPartiallyTrustedCallersAttribute which contains a custom exception class. I want to make it serializable by overriding GetObjectData. With .NET 4, GetObjectDatahas become a SecurityCritical method. This means…
Fabian Schmied
  • 3,885
  • 3
  • 30
  • 49
6
votes
2 answers

How to verify that the source code is copied from web

I am building a web tool to check whether the submitted content is taken from web or is it submitter own work. A plagiarism detector. I have some idea that I can generated check sum and use that as a key to compare with other entries. However, if…
rspr
  • 155
  • 1
  • 3
  • 12
6
votes
2 answers

what does this security warning mean (.Net Process class)?

I am using VSTS 2008 + .Net 2.0 + C#. And I am running Code Analysis after build. I got the following confusing security warning. Here is the warning and related code, any ideas what is wrong? If there is security warning, how to fix…
George2
  • 44,761
  • 110
  • 317
  • 455
6
votes
1 answer

Code Access Security - Understanding why SecurityTransparent can call SecurityCritical

I am researching Code Access Security. It's taking some effort to get my head around, so I thought that I would finally make some use of Reflector and start investigating how .NET 4.0 uses security attributes. Observations The System.IO.File.Delete…
Chris
  • 7,996
  • 11
  • 66
  • 98
5
votes
3 answers

C# WebApp log4net partial trust (High or Medium) not working

I've made a simple .NET 4 Web Application in VS2010, and added a reference to log4net 1.2.11.0 (latest). In this project I've made a Logger class (see end of this post). When I call this Logger class (Logger.Fatal("Test");) in a Full trust…
Michiel van Vaardegem
  • 2,260
  • 20
  • 35
5
votes
2 answers

System.TypeLoadException was unhandled / Inheritance security rules violated while overriding member

Can you create a .NET 4 version of your app for testing was the bosses' innocent question - sure! But after I changed our 27 projects in our Winforms application to .NET 4, and recompiled, when launching the app, I get System.TypeLoadException…
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
5
votes
2 answers

Assembly Evidence

What is the purpose of the following piece of code?: object[] hostEvidence = {new Zone(SecurityZone.Internet)}; Evidence internetEvidence = new Evidence(hostEvidence, null); AppDomain myDomain =…
pkolodziej
  • 1,347
  • 3
  • 17
  • 24
5
votes
2 answers

Where is the .Net Configuration Tool (mscorcfg.msc) in Windows 7?

I am having trouble running a website on my new Windows 7 machine, and I think the issue is solved by setting the runtime security policy to Full Trust, however I can't find that tool anywhere on my machine I can't find it in Control Panel, the…
Rachel
  • 130,264
  • 66
  • 304
  • 490
5
votes
1 answer

Better security of PHP by keeping include files outside the public folder?

Languages such as Perl, Pythong, etc are usually considered to have a better security comparing with PHP. Apart from possible security holes, one reason can be (I do not know, I am asking) that we do not put the executable files of Perl and Python…
Googlebot
  • 15,159
  • 44
  • 133
  • 229
1 2
3
22 23