SqlClientPermission serializable

SqlClientPermission serializable

System.Data.SqlClient (system.data.dll) sealed class

With this class, you can ensure that the current process has the required code access security permission to access the SQL Server provider before you attempt to open a connection. If it doesn't, a System.Security.SecurityException will be thrown. You can also use this class to programmatically revoke the permission to access the SQL Server provider for the current method call.

This class pertains only to code access security (the policy of allowed and disallowed actions you have configured using the .NET Framework Configuration Tool or the caspol .exe command-line utility). It has nothing to do with the authentication process SQL Server uses. For more information, refer to the reference for the base class System.Data.Common.DBDataPermission . Currently, the only code access security restriction you can apply to the SQL Server data provider is denying permission to use blank passwords in the connection string.

 public sealed class  SqlClientPermission  : System.Data.Common.DBDataPermission {  // Public Constructors  public  SqlClientPermission  (  );      public  SqlClientPermission  (System.Security.Permissions.PermissionState   state   );    public  SqlClientPermission  (System.Security.Permissions.PermissionState   state   , bool   allowBlankPassword   );  // Public Instance Methods  public override void  Add  (string   connectionString   , string   restrictions   , System.Data.KeyRestrictionBehavior   behavior   );    // overrides System.Data.Common.DBDataPermission  public override IPermission  Copy  (  );  // overrides System.Data.Common.DBDataPermission  } 

Hierarchy

System.Object figs/u2192.gif System.Security.CodeAccessPermission(System.Security.IPermission, System.Security.ISecurityEncodable , System.Security.IStackWalk) figs/u2192.gif System.Data.Common.DBDataPermission(System.Security.Permissions.IUnrestrictedPermission) figs/u2192.gif SqlClientPermission



ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net