Skip to content

.NET Core samples should not include CAS elements #837

@danmoseley

Description

@danmoseley

In .NET Core, CAS types (like FileIOPermission, etc) and Security Transparency types are stubbed only. CAS is not supported. Therefore the samples in .NET Core topics should not include use of them.

For example, in the AppDomain.UnhandledException topic for .NET Core 2.1 it has this sample:

using System;
using System.Security.Permissions;

public class Example 
{
   [SecurityPermission(SecurityAction.Demand, Flags=SecurityPermissionFlag.ControlAppDomain)]
   public static void Main()
   {
...

Here [SecurityPermission(SecurityAction.Demand, Flags=SecurityPermissionFlag.ControlAppDomain)] should be removed as it does nothing and implies that CAS is relevant.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Pri2Indicates issues/PRs that are medium priorityarea-System.SecurityIssues related to security practices for .NET developers.doc-bugProblem with the content; needs to be fixeddotnet-api/prod

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions