3.12. Permission Classes

Both the SqlClient and the OleDb data providers implement a typed Permission class and a PermissionAttribute attribute. These derive from common bases DBDataPermission and DBDataPermissionAttribute. They are used to integrate the data stack with the rest of the .NET code access security framework. Code access security in .NET defines a set of permissions that code must have to access sensitive resources. The permissions are affected by the location from which the code is loaded. For example, code loaded from a network share or over the Internet may have a much more restricted set of permissions than does code loaded from a local drive. The Permission class is useful for prohibiting untrusted code from accessing your database ...

Get Essential ADO.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.