Downgrades OpenAccess/MySQL Connector dlls

10 posts, 0 answers
  1. João
    João avatar
    2 posts
    Member since:
    May 2011

    Posted 20 Jun 2013 Link to this post

    Is there any way to downgrade the mysql.data dependency? I'm running my website in a shared host (medium trust) and the current version of MySql.Data (6.6.5.0) seems to cause an exception. I see people fixing the problem by replacing the dll to version 6.2.5.0, but when I do that OpenAccess dlls complains about the version.

    Is there any way to bypass this, or downgrade the OpenAccess version to get rid of this problem?

    Btw, I've changed the rlinq configuration to medium trust already. The problem seems to be the MySql dll, not OpenAccess.

    Also, here is the stack trace:

    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:
     
     
    [InvalidOperationException: Cannot perform CAS Asserts in Security Transparent methods]
       MySql.Data.MySqlClient.MySqlClientFactory..cctor() +23
     
    [OpenAccessException: Cannot perform CAS Asserts in Security Transparent methods]
       OpenAccessRuntime.ExceptionWrapper.Throw() +7
       OpenAccessRuntime.Helper.getPersistenceManagerFactory(PropertySet props) +160
       OpenAccessRuntime.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open) +1078
       OpenAccessRuntime.DatabaseAdapter.GetObjectScope(TransactionProvider provider) +36
       Telerik.OpenAccess.Database.GetObjectScope(TransactionProvider provider) +13
       Telerik.OpenAccess.OpenAccessContextBase.GetScope() +42
       Telerik.OpenAccess.OpenAccessContext.GetAllCore() +33
       Telerik.OpenAccess.OpenAccessContext.GetAll() +48
       Cerberus.Models.Users.Authenticator.Validate(String email, String password) +128
       Cerberus.Controllers.AccountController.Login(LoginForm form) +80
       lambda_method(Closure , ControllerBase , Object[] ) +86
       System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +188
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
       System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
       System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +29
       System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +238
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +238
       System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +12
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +31
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +23
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +128
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +26
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +41
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +28
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +30
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8966925
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

    Thank you!
  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 25 Jun 2013 Link to this post

    Hi João,

      OpenAccess loads the ADO.NET driver (mysql.data assembly) using the standard ADO.NET ProviderFactory mechanism. If your machine.config points to the '6.2.5.0' version then OpenAccess will try to use this version of the driver. Is this version present in the GAC? What exception do you get when you try to use this version?

    Regards,
    Ady
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
  3. DevCraft banner
  4. Nelson
    Nelson avatar
    9 posts
    Member since:
    Mar 2013

    Posted 02 Jan 2014 Link to this post

    Hi John ..

    You could find a solution to your problem?

    I'm going through the same situation and did not think a way to solve.

    Regards ...

    Nelson Santos
  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 07 Jan 2014 Link to this post

    Hi Nelson,

     What version of the MySql.Data assembly do you have installed? Have you tried using version '6.2.5.0' and if yes, do you still face the same issue?


    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  6. Nelson
    Nelson avatar
    9 posts
    Member since:
    Mar 2013

    Posted 07 Jan 2014 Link to this post

    Hi Ady ...

    At first I used the version that you send along with your product (6.6.5.0).

    Then tested with a recent version downloaded from MySql site (6.8.3.0).

    In both I used the "ProviderFactory mechanism" suggested for you to have the system make use of this new version.

    I have not tested with the older version suggested by you. This could be the problem? Ie I would have to download the older version for it to work?

    Here is the stack trace 
    Telerik.OpenAccess.Runtime --> Cannot perform CAS Asserts in Security Transparent methodsem:
       at OpenAccessRuntime.ExceptionWrapper.Throw()
       at OpenAccessRuntime.Helper.getPersistenceManagerFactory(PropertySet props)
       at OpenAccessRuntime.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open)
       at OpenAccessRuntime.DatabaseAdapter.GetObjectScope(TransactionProvider provider)
       at Telerik.OpenAccess.Database.GetObjectScope(TransactionProvider provider)
       at Telerik.OpenAccess.OpenAccessContextBase.GetScope()
       at Telerik.OpenAccess.OpenAccessContext.GetAllCore[T]()
       at Telerik.OpenAccess.OpenAccessContext.GetAll[T]()
       at RepresDAO.Repres.get_Clientes() in d:\sistemas\fontes\Repres\RepresMobileSolution\RepresObjects\DatabaseObjects\Repres.cs:line 250
       at RepresDataObjects.webservices.servicos_v2.RetornaClientes(Int32 Start, Int32 Lenght) in d:\sistemas\fontes\Repres\RepresMobileSolution\RepresDataObjects\webservices\servicos_v2.asmx.cs:line 687
    MySql.Data --> Cannot perform CAS Asserts in Security Transparent methodsem:
       at MySql.Data.MySqlClient.MySqlClientFactory..cctor()

    Regards...

    Nelson
  7. Ady
    Admin
    Ady avatar
    588 posts

    Posted 09 Jan 2014 Link to this post

    Hi Nelson,

     You should try with a version lower than 6.6.5. Can you do that and let me know if you still face these issues?

    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  8. Nelson
    Nelson avatar
    9 posts
    Member since:
    Mar 2013

    Posted 31 Jan 2014 in reply to Ady Link to this post

    Hi Ady...

    Sorry for long delay in answer, but I having to working out these days and dont have time to do the adjustments.

    Really the change for a old version solve the problem. I have used the version 6.3.5 that is provided by my ISP.

    For that someone have the same problem, the solution work perfectly!

    On my opinion the unique problem is that he have do use a version that is old and can be have bugs on it.

    Is there any plan to update de OpenAccess to use a new version of mysql connector without the problem of medium trust?

    Thanks.

    Nelson Santos
  9. Ady
    Admin
    Ady avatar
    588 posts

    Posted 04 Feb 2014 Link to this post

    Hello Nelson,

     The problem is not with OpenAccess but with some changes in the newer MySql connector. At the moment there are no immediate plans to test against the latest version of the MySql connector. 
    Even if we do that we would need to investigate if the problem can be fixed by changes in OpenAccess or they it needs to be fixed in the MySql connector itself.

    Regards,
    Ady
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  10. Nelson
    Nelson avatar
    9 posts
    Member since:
    Mar 2013

    Posted 04 Feb 2014 in reply to Ady Link to this post

    Ok Ady... thanks for your feedback!!!

    Anyway, if you need someone to test possible adjustments on this issue, you can count on me!

    Regards

    Nelson Santos
  11. Ady
    Admin
    Ady avatar
    588 posts

    Posted 05 Feb 2014 Link to this post

    Hi Nelson,

     Thank you for that offer. We will inform you if such need arises.

    Regards,
    Ady
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top
DevCraft banner