By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,710 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,710 IT Pros & Developers. It's quick & easy.

OleDbConnection Security Exception

P: n/a
I wish to allow ASP.NET pages to make connections to Access databases using
OleDBConnection.

The only way I have been able to make this functionality work has been to
set:

Unrestricted="true"

In the <PermissionSet> property applying to ASP.NET pages, otherwise I get:

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request failed.

I do not wish to run ASP.NET pages in an unrestricted security policy, I
would be grateful if you could inform me which permissions I must grant to
allow the use of OleDBConnection. I have granted unrestricted
OleDbPermission, FileIOPermission and RegistryPermission but to no avail.
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Nothing you can do about it.

ASP.NET requires Full Trust in order to allow OleDb, Odbc and OracleClient connections.

From the docs:

"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. At present, using the OleDbPermission class has no effect."

Regards,
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 17 '05 #2

P: n/a
Nothing you can do about it.

ASP.NET requires Full Trust in order to allow OleDb, Odbc and OracleClient connections.

From the docs:

"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. At present, using the OleDbPermission class has no effect."

Regards,
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.