Solved

Security Exception (using mysql connector)

Posted on 2009-07-05
2
855 Views
Last Modified: 2012-05-07
ASP.NET website using MySql db and a connector I purchased (MyDirect.NET).

Local machine:  All works perfectly.

Deployed to GoDaddy ASP.NET web hosting.  I get this error:

----------------

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.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +58
   System.Reflection.Assembly.get_Location() +70
   CoreLab.Common.ab.a(Assembly A_0) +32
   CoreLab.Common.ac.a(LicenseContext A_0, Type A_1, String& A_2, String& A_3, String& A_4) +2413
   CoreLab.Common.ac.a(LicenseContext A_0, Type A_1, String& A_2, Boolean& A_3, String& A_4, String& A_5) +33
   CoreLab.Common.ac.a(LicenseContext A_0, Type A_1, Boolean A_2) +181
   CoreLab.MySql.MySqlDirectFactory.CreateConnection() +64
   System.Data.Design.DataComponentMethodGenerator.AddConnectionMembers(CodeTypeDeclaration dataComponentClass) +56
   System.Data.Design.DataComponentMethodGenerator.AddMethods(CodeTypeDeclaration dataComponentClass, Boolean isFunctionsDataComponent) +106
   System.Data.Design.DataComponentGenerator.GenerateDataComponent(DesignTable designTable, Boolean isFunctionsComponent, Boolean generateHierarchicalUpdate) +819
   System.Data.Design.TypedDataSourceCodeGenerator.GenerateDataSource(DesignDataSource dtDataSource, CodeCompileUnit codeCompileUnit, CodeNamespace mainNamespace, String dataSetNamespace, GenerateOption generateOption) +485
   System.Data.Design.TypedDataSetGenerator.GenerateInternal(DesignDataSource designDS, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeDomProvider codeProvider, GenerateOption generateOption, String dataSetNamespace) +201

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3072

-------

In web.config I changed Trust level to Full but then I got another error:

-------

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: This configuration section cannot be used at this path.  This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.

Source Error:


Line 55:       </system.net>
Line 56:       <system.web>
Line 57:           <trust level="Full" originUrl="" />
Line 58:
Line 59:             <!--

Source File: D:\Hosting\4616160\html\web.config    Line: 57

------------

Any ideas?
0
Comment
Question by:RobertNZana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:prairiedog
ID: 24788642
It seems that you asked the same question at their forum and your question was answered by the development team here: http://www.devart.com/forums/viewtopic.php?t=15239&sid=c99914a9662eb56a6bfc6f8d30fd1dac
0
 
LVL 9

Accepted Solution

by:
RobertNZana earned 0 total points
ID: 24788685
Yes, since no one responded, and it was pressing, I did ask it there.  The funny thing is that somehow, after reuploading the site and changing a few misc things, it began to work.  Go figure!  Thanks!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question