The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

MySQL Connector/NET Issue in medium trusted environment.

Last post 09-24-2007, 8:24 AM by Mike.Griffin. 10 replies.
Sort Posts: Previous Next
  •  06-30-2007, 9:56 PM 3482

    MySQL Connector/NET Issue in medium trusted environment.

    EntitySpaces Version:            EntitySpaces 2007
    MyGeneration Version:           1.2.0.7
    Database:                              MySQL 4.1
    Hosting Provider:                    godaddy


    I recently purchased and switched to entityspaces from dodadds architecture, but caught in big problem. I see your EntitySpaces dlls are signed and using MySQL Connector/NET version 5.0.3.0 which is signed by MySQL and is not medium trust environment friendly. I see that here many people pointed out this problem, but there is no solid solution.
    I recompiled MySQL Connector for medium trust environment by putting
    [assembly: AllowPartiallyTrustedCallers()] line in assemblyinfo.cs, so was successful to use it with dodadds by compiling that assembly with newer compiled MySQL Connector, but this can’t be applied to Entityspaces as your assemblies are signed and compiled and I can’t alter your code.
    I have no other choice except to revert back to dodadds and modify it to support nullables, unless you can send me patch.
     I’ll request you to please re-compile MySQL connector for Medium trust environment and signed it with your key. You’ll probably need to recompile your rest of MySqlClientProvider too to support your compiled MySQL Connector.
    The second approach is that you send me your code and I’ll do it myself, but I know this is not your ideal solution.

    Fast action is requested.
  •  07-03-2007, 2:48 PM 3539 in reply to 3482

    Re: MySQL Connector/NET Issue in medium trusted environment.

    Here is where we stand, as best as I can tell:

    1) .NET, by default looks for the specific version of a reference that EntitySpaces is compiled against. We have "Specific Version" set to false, but that is a compile directive, not a runtime directive.

    http://msdn2.microsoft.com/en-us/library/51ket42z(vs.71).aspx

    2) We do not implement publisher policy. This lets you do assembly redirection in your config file. But, that still is linked to the Public Key Token for MySQL Connector. You can run against a different version of the assembly, but not a completely different assembly.

    3) MySQL Connector does not support medium trust without recompiling. MySQL, obviously, is not going to publish the snk file, so the new assembly is going to have a new Public Key Token, which will not work with EntitySpaces, or with assembly redirection.

    4) MySQL's license prohibits us, as commercial vendors, from taking their source, compiling, and distributing our own medium trust enabled Connector.

    5) We are not going to give away source because a specific database vendor does not implement a specific EntitySpaces feature, or because a specific Web host does not allow running under full trust. We do have source available for purchase.

    6) We have plans for user defined providers, but that is going to be months down the road.

    7) We are open to suggestions. For example, there are pre-compiled MySQL Connectors available on the Web that support medium trust. If our MySQL users could agree on a single, trusted, alternative assembly, we could easily add a second EntitySpaces MySqlClientProviderMT that was linked to that assembly.

    Any ideas?


    David Neal Parsons
    www.entityspaces.net
  •  07-04-2007, 8:10 AM 3544 in reply to 3539

    Re: MySQL Connector/NET Issue in medium trusted environment.

    David,

    I can understand you can't do much and for the moment I have no idea how to do. Can you give me an example of pre-compiled connector you mentioned in point 7?



     

  •  07-04-2007, 4:37 PM 3568 in reply to 3544

    Re: MySQL Connector/NET Issue in medium trusted environment.

    I was hoping one of you would take the initiative, as it will take some research, and we do not have the time to do it. A quick Google search turned up lots of links, but as you click, you find that some are 1.x, some are 5.x, but not signed with their own snk. Here's one for 5.0.3 that is signed, but clicking on the guys home page is hardly reassuring as a "trusted" source

    http://forums.brinkster.com/forummessage.asp?id=113904&Forum=23

    Honestly, the best solution is for the official MySQL version to support medium trust. This was Reggie Burnett's official response from as far back as September of last year.

    http://forums.mysql.com/read.php?38,117699,118311#msg-118311

    I understand that what may seem like a trivial change and recompile, actually requires a lot more research and testing by them. This Blog sheds some light on that.

    http://blogs.msdn.com/shawnfa/archive/2005/02/04/367390.aspx

    Maybe if everyone posting here started posting on the MySQL forums, it would put the pressure on Wink They just need to understand how urgently medium trust support is needed.


    David Neal Parsons
    www.entityspaces.net
  •  07-05-2007, 1:33 AM 3573 in reply to 3568

    Re: MySQL Connector/NET Issue in medium trusted environment.

    I found like you some link about recompiled connectors but, as you said, how do you know if they are "trusted"? I could recompile a signed connector by myself and put it in a website today but....

    I will put my pressure on MySql forum and I hope someone else do the same Smile

     

  •  07-05-2007, 7:26 AM 3584 in reply to 3573

    Re: MySQL Connector/NET Issue in medium trusted environment.

  •  07-05-2007, 9:39 AM 3592 in reply to 3584

    Re: MySQL Connector/NET Issue in medium trusted environment.

    Hi,

    I am new to the forum. In the process of configuring EntitySpaces w/MySQL and I have run into this error. Does this mean (I hope not) that all EntitySpace-MySQL users will have to agree on a public key for an alternate recompile?

    Is there no way, on any security-level for me to connect EntitySpaces to MySQL I would love to leverage MySQL we currently have SQL 2000 and would prefer not to upgrade to 2005. I really like EntitySpaces! We have our own servers (we are not hosted) for both production and development.

    Thanks!Michael


    Project Manager / Sr. Software Developer
    MRN Manager .NET
  •  07-05-2007, 11:03 AM 3598 in reply to 3592

    Re: MySQL Connector/NET Issue in medium trusted environment.

    I think what it means is that within a matter of days there will an official MySQL connector available that supports Medium Trust with the same Public Key, and this whole issue becomes moot. Weehee! Party!!!

    MySQL's Connector currently runs under Full Trust. The issue is with 3rd party hosts that only allow Medium Trust.


    David Neal Parsons
    www.entityspaces.net
  •  07-06-2007, 2:30 AM 3621 in reply to 3598

    Re: MySQL Connector/NET Issue in medium trusted environment.

    Reggie wrote in MySql's Forum :

    "A medium trust assembly is not all you need. You also need your host to allow SocketPermission in their medium trust configuration."

     It is important to remind, even if the connector runs in medium trust it could not be enough to solve the problem with all hosts.

  •  09-24-2007, 8:16 AM 5268 in reply to 3621

    Re: MySQL Connector/NET Issue in medium trusted environment.

    In this thread http://forums.mysql.com/read.php?38,174299,174299   I asked to Reggie Burnett when the connector will support medium trust. The answer is :

    "The latest releases (5.0.8.1 and 5.1.3) support medium trust."

    It's time to test if this is the solution for some hosting service providers that allow only medium trust!

  •  09-24-2007, 8:24 AM 5269 in reply to 5268

    Re: MySQL Connector/NET Issue in medium trusted environment.

    Using this post http://msdn2.microsoft.com/en-us/library/ms998341.aspx it only takes a simple config entry to toggle an ASP.NET site into medium trust, however, other things come into play. However, we can do a test and other MySQL users should check it out too.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML