Security Exception connecting to database

Security Exception connecting to database

Postby mjohnson139 » Tue 04 May 2010 04:14

Update: I was able to recreate this on my Dev machine. I uninstalled the DevArt Drivers from my dev machine GAC and started getting the same error (Devart.Common.DbConnectionInternal.EnlistToDistributedTransaction). It's some kind of permission thing when the DLLs are not in the GAC.

----Original Post------

It works on my dev machine, but when I put the code up to GoDaddy grid hosting, I get a security exception on Devart.Common.DbConnectionInternal.EnlistToDistributedTransaction.

Now I'm not sure what the EnlistToDistruibutedTransaction is all about but I'm pretty sure I don't need it. The code is doing a simple read from a table using a unique constraint.


I'm using
Devart dotConnect for MySQL express version=5.70.124.0,
LLBLGen Pro version 2.6 Final Oct 9th, 2009
SD.LLBLGen.Pro.ORMSupportClasses.NET v2.6.8.1013
MySql Version - 5.0
.Net 3.5



Stack Trace

System.Security.SecurityException: Request failed.\u000d\u000a at Devart.Common.DbConnectionInternal.EnlistToDistributedTransaction(Transaction transaction)\u000d\u000a at Devart.Common.DbConnectionInternal.a()\u000d\u000a at Devart.Data.MySql.ay.a()\u000d\u000a at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)\u000d\u000a at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)\u000d\u000a at Devart.Common.DbConnectionBase.Open()\u000d\u000a at Devart.Data.MySql.MySqlConnection.Open()\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.OpenConnection()\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PrepareQueryExecution(IQuery queryToExecute, Boolean forceConnectionSet)\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteSingleRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFields2 fieldsToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo)\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingFilter(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfos, IRelationPredicateBucket filter)\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingFilter(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath, Context contextToUse, IRelationPredicateBucket filter, ExcludeIncludeFieldsList excludedIncludedFields)\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingUniqueConstraint(IEntity2 entityToFetch, IPredicateExpression uniqueConstraintFilter, IPrefetchPath2 prefetchPath, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields)\u000d\u000a at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingUniqueConstraint(IEntity2 entityToFetch, IPredicateExpression uniqueConstraintFilter, IPrefetchPath2 prefetchPath)\u000d\u000a at GTApp.Dao.UserDao.ReadUser(String email) in C:\clients\GT\GTAppServices\src\GTApp.Dao\UserDao.cs:line 129\u000d\u000a at GTApp.Dao.UserDao.ReadUserDto(String email) in C:\clients\GT\GTAppServices\src\GTApp.Dao\UserDao.cs:line 140\u000d\u000a at GTApp.Services.players.GetUserAccount(String userName) in C:\clients\GT\GTAppServices\src\GTApp.Services\players\players.svc.cs:line 40\u000d\u000aThe action that failed was:\u000d\u000aLinkDemand\u000d\u000aThe type of the first permission that failed was:\u000d\u000aSystem.Security.PermissionSet\u000d\u000aThe Zone of the assembly that failed was:\u000d\u000aMyComputer"}
mjohnson139
 
Posts: 1
Joined: Tue 04 May 2010 04:09

Postby Shalex » Fri 07 May 2010 08:37

Could you please tell us if the exception happens inside the TransactionScope block?
If the exception is not inside TransactionScope, the next build fix will resolve the problem.
Also please check if your application loads the latest version (5.70.124) of Devart.MySql.Data.dll to its process, because the 5.70.124 version also includes some changes related to this issue.
Shalex
Devart Team
 
Posts: 7533
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for MySQL