Skip to content

Add alert about CAS deprecation #8105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions includes/cas-deprecated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!CAUTION]
> Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.
3 changes: 3 additions & 0 deletions xml/System.Configuration/ConfigurationPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The <xref:System.Configuration.ConfigurationPermission> class provides a permission structure that allows methods or classes to access configuration files. Also, <xref:System.Configuration.ConfigurationPermission> provides ways to resolve multiple permissions values through such methods as <xref:System.Configuration.ConfigurationPermission.Union%2A> and <xref:System.Configuration.ConfigurationPermission.Intersect%2A>.

]]></format>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@
</Attributes>
<Docs>
<summary>Creates a <see cref="T:System.Configuration.ConfigurationPermission" /> object that either grants or denies the marked target permission to access sections of configuration files.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<altmember cref="T:System.Configuration.ConfigurationPermission" />
<related type="Article" href="/dotnet/standard/attributes/">Extending Metadata Using Attributes</related>
</Docs>
Expand Down
10 changes: 9 additions & 1 deletion xml/System.Data.Common/DBDataPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@
</Attributes>
<Docs>
<summary>Enables a .NET data provider to help ensure that a user has a security level adequate for accessing data.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<related type="Article" href="/dotnet/framework/data/adonet/ado-net-overview">ADO.NET Overview</related>
</Docs>
<Members>
Expand Down
10 changes: 9 additions & 1 deletion xml/System.Data.Common/DBDataPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@
</Attributes>
<Docs>
<summary>Associates a security action with a custom security attribute.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<related type="Article" href="/dotnet/framework/data/adonet/ado-net-overview">ADO.NET Overview</related>
</Docs>
<Members>
Expand Down
3 changes: 3 additions & 0 deletions xml/System.Data.Odbc/OdbcPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This class is intended for future use when the .NET Framework Data Provider for ODBC is enabled for partial trust scenarios. The .NET Framework Data Provider for ODBD currently requires FullTrust permission. Currently, using the `OdbcPermission` class has no effect. For more information, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security).

]]></format>
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Data.Odbc/OdbcPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This class is intended for future use when the .NET Framework Data Provider for ODBC is enabled for partial trust scenarios. The .NET Framework Data Provider for ODBC currently requires FullTrust permission. Currently, using the `OdbcPermissionAttribute` class has no effect. For more information, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security).

]]></format>
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Data.OleDb/OleDbPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This class is intended for future use when the .NET Framework Data Provider for OLE DB is enabled for partial trust scenarios. The .NET Framework Data Provider for OLE DB currently requires FullTrust permission. Currently, using the `OleDbPermission` class has no effect. For more information, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security).

]]></format>
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Data.OleDb/OleDbPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This class is intended for future use when the .NET Framework Data Provider for OLE DB is enabled for partial trust scenarios. The .NET Framework Data Provider for OLE DB currently requires FullTrust permission. Currently, using the `OleDbPermissionAttribute` class has no effect. For more information, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security).

]]></format>
Expand Down
7 changes: 5 additions & 2 deletions xml/System.Data.OracleClient/OraclePermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This type is deprecated and will be removed in a future version of the .NET Framework. For more information, see [Oracle and ADO.NET](/dotnet/framework/data/adonet/oracle-and-adonet).
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This type is deprecated and will be removed in a future version of .NET Framework. For more information, see [Oracle and ADO.NET](/dotnet/framework/data/adonet/oracle-and-adonet).

The <xref:System.Data.OracleClient.OraclePermission.IsUnrestricted%2A> property takes precedence over the <xref:System.Data.OracleClient.OraclePermission.AllowBlankPassword%2A> property. Therefore, if you set <xref:System.Data.OracleClient.OraclePermission.AllowBlankPassword%2A> to `false`, you must also set <xref:System.Data.OracleClient.OraclePermission.IsUnrestricted%2A> to `false` to prevent a user from making a connection using a blank password.

Expand Down
7 changes: 5 additions & 2 deletions xml/System.Data.OracleClient/OraclePermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This type is deprecated and will be removed in a future version of the .NET Framework. For more information, see [Oracle and ADO.NET](/dotnet/framework/data/adonet/oracle-and-adonet).
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This type is deprecated and will be removed in a future version of .NET Framework. For more information, see [Oracle and ADO.NET](/dotnet/framework/data/adonet/oracle-and-adonet).

]]></format>
</remarks>
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Data.SqlClient/SqlClientPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The <xref:System.Data.Common.DBDataPermission.IsUnrestricted%2A> property takes precedence over the <xref:System.Data.Common.DBDataPermission.AllowBlankPassword%2A> property. Therefore, if you set <xref:System.Data.Common.DBDataPermission.AllowBlankPassword%2A> to `false`, you must also set <xref:System.Data.Common.DBDataPermission.IsUnrestricted%2A> to `false` to prevent a user from making a connection using a blank password.

> [!NOTE]
Expand Down
10 changes: 9 additions & 1 deletion xml/System.Data.SqlClient/SqlClientPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@
</Attributes>
<Docs>
<summary>Associates a security action with a custom security attribute.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<related type="Article" href="/dotnet/framework/data/adonet/ado-net-overview">ADO.NET Overview</related>
</Docs>
<Members>
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Diagnostics/EventLogPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

Do not grant <xref:System.Diagnostics.EventLogPermission> to partially trusted code. The ability to read and write the event log enables code to perform actions such as issuing event log messages in the name of another application.

> [!NOTE]
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Diagnostics/EventLogPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

For more information about using attributes, see [Attributes](/dotnet/standard/attributes/).

]]></format>
Expand Down
10 changes: 9 additions & 1 deletion xml/System.Diagnostics/PerformanceCounterPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@
</Attributes>
<Docs>
<summary>Allows control of code access permissions for <see cref="T:System.Diagnostics.PerformanceCounter" />.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<altmember cref="T:System.Diagnostics.PerformanceCounter" />
<altmember cref="T:System.Diagnostics.PerformanceCounterPermissionAccess" />
<altmember cref="T:System.Diagnostics.PerformanceCounterPermissionAttribute" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

For more information about using attributes, see [Attributes](/dotnet/standard/attributes/).

]]></format>
Expand Down
10 changes: 9 additions & 1 deletion xml/System.DirectoryServices/DirectoryServicesPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@
</Attributes>
<Docs>
<summary>The <see cref="T:System.DirectoryServices.DirectoryServicesPermission" /> class allows you to control code access security permissions for <see cref="N:System.DirectoryServices" />.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<altmember cref="T:System.DirectoryServices.DirectoryServicesPermissionAttribute" />
<altmember cref="T:System.DirectoryServices.DirectoryServicesPermissionEntry" />
<altmember cref="T:System.DirectoryServices.DirectoryServicesPermissionEntryCollection" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
</Attributes>
<Docs>
<summary>Allows declarative <see cref="N:System.DirectoryServices" /> permission checks.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
<altmember cref="T:System.DirectoryServices.DirectoryServicesPermissionAttribute" />
<altmember cref="T:System.DirectoryServices.DirectoryServicesPermission" />
<altmember cref="T:System.DirectoryServices.DirectoryServicesPermissionEntry" />
Expand Down
10 changes: 9 additions & 1 deletion xml/System.Drawing.Printing/PrintingPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@
</Attributes>
<Docs>
<summary>Controls access to printers. This class cannot be inherited.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

For more information about using attributes, see [Attributes](/dotnet/standard/attributes/).

]]></format>
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Net.Mail/SmtpPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The <xref:System.Net.Mail.SmtpPermission> and <xref:System.Net.Mail.SmtpPermissionAttribute> classes control access to SMTP host computers. The <xref:System.Net.Mail.SmtpClient> class demands an <xref:System.Net.Mail.SmtpPermission> when sending electronic mail to the SMTP host for delivery.

The <xref:System.Net.Mail.SmtpAccess> enumeration specifies the level of access controlled by an instance of this permission.
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Net.Mail/SmtpPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The <xref:System.Net.Mail.SmtpPermission> and <xref:System.Net.Mail.SmtpPermissionAttribute> classes control access to SMTP host computers. The <xref:System.Net.Mail.SmtpClient> class demands an <xref:System.Net.Mail.SmtpPermission> when sending electronic mail to the SMTP host for delivery.

The <xref:System.Net.Mail.SmtpAccess> enumeration specifies the level of access controlled by an instance of this permission.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This permission is used to secure data returned by the classes in the <xref:System.Net.NetworkInformation> namespace.

For declarative security, use the <xref:System.Net.NetworkInformation.NetworkInformationPermissionAttribute> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

This permission is used by classes that provide information about network connections and traffic statistics such as those in the <xref:System.Net.NetworkInformation> namespace.

The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the <xref:System.Net.NetworkInformation.NetworkInformationPermission> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The default <xref:System.Security.Permissions> allow all local and Intranet zone applications to access collaboration services, and no permission is granted for Internet zone applications. In other words, if the default permissions are not changed, all link-local and site-local applications have access to Peer-To-Peer collaboration services, but global applications have no access.

This class is not derivable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The scope of the declaration that is allowed depends on the <xref:System.Security.Permissions.SecurityAction> that is used.

The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the corresponding permission class.
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Net.PeerToPeer/PnrpPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The default permissions allow all local and Intranet zone applications to access PNRP services. If the default permissions are not changed, all link-local and site-local applications have access to Peer-to-Peer services, but global (internet) applications have no access.

Instances of this type have two permission states: they either have no access to the resources protected by the permission, or they have unrestricted full access to those resources.
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Net.PeerToPeer/PnrpPermissionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The scope of the security declaration that is allowed depends on the <xref:System.Security.Permissions.SecurityAction> that is used.

The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the corresponding permission class.
Expand Down
5 changes: 4 additions & 1 deletion xml/System.Net/DnsPermission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
## Remarks

[!INCLUDE[cas-deprecated](~/includes/cas-deprecated.md)]

The default permissions allow all local and Intranet zone applications to access DNS services, and no DNS permission for Internet zone applications.

]]></format>
Expand Down
Loading