Wednesday, October 31, 2007

Trust Level in Dot Net

Trust level refers to permission set in the web.config file
"system.web"
"securitypolicy"
"trust level="medium""
"/trust"
"/securitypolicy"
Application operating under a Medium trust level have no registry access, no access to windows eventlog, and cannot use reflection, file system access is limited to the applications virtual directory hierarchy.

Different trust levels
"trust level="Full|High|Medium|Low|Minimal""

ASP.Net 1.1 and 2.0, medium trust application can access SQL server database because SQL Server data provider does not demand full trust and SqlClientPermission is granted to medium trust applications.
In 2.o Oracle .net provider, the OLE DB .NET data provider, ODBC .NET data provider no longer demand full trust.

No comments: