472,333 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

Permissions Error When Accessing Access Database

When I attempt to access a Microsoft Access database from my website, I
recieve the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

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 for the
permission of type 'System.Data.OleDb.OleDbPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Take note that the description says that this can be fixed by modifying the
configuration file, which I am assuming is referring to the Web.config file.
I have successfully run this application on my machine using Visual Studio
2005's Development Server with the settings currently in the Web.config
file, so if modifying the Web.config file will fix it, what do I need to
change? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jun 29 '07 #1
3 5533
On Jun 29, 2:50 am, "Nathan Sokalski" <njsokal...@hotmail.comwrote:
When I attempt to access a Microsoft Access database from my website, I
recieve the following error:

Server Error in '/' Application.
---------------------------------------------------------------------------*-----

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 for the
permission of type 'System.Data.OleDb.OleDbPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Take note that the description says that this can be fixed by modifying the
configuration file, which I am assuming is referring to the Web.config file.
I have successfully run this application on my machine using Visual Studio
2005's Development Server with the settings currently in the Web.config
file, so if modifying the Web.config file will fix it, what do I need to
change? Thanks.
--
Nathan Sokalski
njsokal...@hotmail.comhttp://www.nathansokalski.com/

Why do you use OleDb for MS Access?

http://msdn2.microsoft.com/en-us/lib...onnection.aspx

An application that creates an instance of the OleDbConnection object
can require all direct and indirect callers to have sufficient
permission to the code by setting declarative or imperative security
demands. OleDbConnection makes security demands using the
OleDbPermission object. Users can verify that their code has
sufficient permissions by using the OleDbPermissionAttribute object.
Users and administrators can also use the Code Access Security Policy
Tool (Caspol.exe) to modify security policy at the computer, user, and
enterprise levels. For more information, see Code Access Security and
ADO.NET.

http://msdn2.microsoft.com/en-us/library/0x4t63kb.aspx

Jun 29 '07 #2
I use OleDb for MS Access because of the namespaces that are included in the
..NET Framework (or that I have ever heard of from third parties)
System.Data.OleDb is the one that is supposed to be used when accessing a MS
Access database. The reason I am using MS Access for this website rather
than a higher quality database such as SQL Server or Oracle is because the
organization the site is for cannot afford anything else.

I have used System.Data.OleDb for MS Access databases in other sites I have
written, such as my personal website, with no problem, and any books that I
have read that use MS Access as their example database have as well, so I
know that it is the right one to use.

I have never had to deal with any of the objects you mention (except for
OleDbConnection, of course). Could you please either give me a code sample
or direct me to a site that gives one? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@c77g2000hse.googlegr oups.com...
On Jun 29, 2:50 am, "Nathan Sokalski" <njsokal...@hotmail.comwrote:
When I attempt to access a Microsoft Access database from my website, I
recieve the following error:

Server Error in '/' Application.
---------------------------------------------------------------------------*-----

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 for the
permission of type 'System.Data.OleDb.OleDbPermission, System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Take note that the description says that this can be fixed by modifying
the
configuration file, which I am assuming is referring to the Web.config
file.
I have successfully run this application on my machine using Visual Studio
2005's Development Server with the settings currently in the Web.config
file, so if modifying the Web.config file will fix it, what do I need to
change? Thanks.
--
Nathan Sokalski
njsokal...@hotmail.comhttp://www.nathansokalski.com/

Why do you use OleDb for MS Access?

http://msdn2.microsoft.com/en-us/lib...onnection.aspx

An application that creates an instance of the OleDbConnection object
can require all direct and indirect callers to have sufficient
permission to the code by setting declarative or imperative security
demands. OleDbConnection makes security demands using the
OleDbPermission object. Users can verify that their code has
sufficient permissions by using the OleDbPermissionAttribute object.
Users and administrators can also use the Code Access Security Policy
Tool (Caspol.exe) to modify security policy at the computer, user, and
enterprise levels. For more information, see Code Access Security and
ADO.NET.

http://msdn2.microsoft.com/en-us/library/0x4t63kb.aspx
Jun 29 '07 #3
"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@c77g2000hse.googlegr oups.com...
Why do you use OleDb for MS Access?
How else would you expect to use a Jet database within the .NET
Framework...???
--
http://www.markrae.net

Jun 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Shelly | last post by:
I have a new server and I have my files up there. The files are in /var/www/html/. In this directory I have another directory that I created...
0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting...
2
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting...
1
by: Micah Gentry | last post by:
Is there any way to allow a user to use the xp_cmdshell extended stored procedure without giving that user execute permissions to xp_cmdshell in...
16
by: Lyle Fairfield | last post by:
There is an MS-SQL table named Bugs_Comments_and_Suggestions. There is a form named Bugs_Comments_and_Suggestions. To allow John Doe to use...
3
by: ajrohan | last post by:
Hi - I need help with an Access security problem. I've already Googled this one but found no help and I'm starting to think there might not be any...
2
by: dimstthomas | last post by:
Hello I have posted to this group as it seems to be a lot busier than the odbc specific ones. If you can suggest a more appropriate group I will...
6
by: Fred W. | last post by:
When my application starts I need to check folder permissions to ensure they have "Full Control" before I let them proceed on. How can I check this...
3
by: palepimp | last post by:
Hello all, I have searched far and wide for a solution to my issue. In short, here is the problem: 1. 3 PC's enter data into an Access 2003...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.