Caution
Code Access Security is not supported or honored by the runtime.
Enables the .NET Framework Data Provider for SQL Server to help make sure that a user has a security level sufficient to access a data source.
public ref class SqlClientPermission sealed : System::Data::Common::DBDataPermission
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class SqlClientPermission : System.Data.Common.DBDataPermission
[System.Serializable]
public sealed class SqlClientPermission : System.Data.Common.DBDataPermission
public sealed class SqlClientPermission : System.Data.Common.DBDataPermission
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SqlClientPermission = class
inherit DBDataPermission
[<System.Serializable>]
type SqlClientPermission = class
inherit DBDataPermission
type SqlClientPermission = class
inherit DBDataPermission
Public NotInheritable Class SqlClientPermission
Inherits DBDataPermission
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.
The IsUnrestricted property takes precedence over the AllowBlankPassword property. Therefore, if you set AllowBlankPassword to false
, you must also set IsUnrestricted to false
to prevent a user from making a connection using a blank password.
Note
When using code access security permissions for ADO.NET, the correct pattern is to start with the most restrictive case (no permissions at all) and then add the specific permissions that are needed for the particular task that the code needs to perform. The opposite pattern, starting with all permissions and then denying a specific permission, is not secure, because there are many ways of expressing the same connection string. For example, if you start with all permissions and then attempt to deny the use of the connection string "server=someserver", the string "server=someserver.mycompany.com" would still be allowed. By always starting by granting no permissions at all, you reduce the chances that there are holes in the permission set.
Constructors Properties Methods See alsoCollaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4