+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Sitefinity & MySql connector

Sitefinity & MySql connector

5 posts, 1 answered
  1. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    03 Sep 2010
    Link to this post
    Hi there,

    We are using Sitefinity 3.6 SP1
    As part of our custom requirement we have developed Data access layer using Mysql connector (Mysql.Data.dll) version 6.3.0
    This DAL is used in some of the usercontrols inside sitefinity project for custom requirements.
    Now when we try to deploy this we came know that Sitefinity is already using MySql.Data.dll (Version 5.0.7.0)
    So at present we can not use both these versions simultaneously.
    Because when we use 6.3.0 than Sitefinity CMS pages stop working and when use 5.0.7.0 than our custom functions stop working.

    Please do let us know if there is any proper solution for this.

    Regards,
    Gaurav
  2. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    03 Sep 2010
    Link to this post
    Hi there,

    There is a way to load 2 different versions of the same assembly so you can try to create different domains and use your custom assembly. You can check these articles:



    Best,

    G
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Sep 2010
    Link to this post
    Hi,

    @George thank you for the suggestion. This is one way you can accomplish this.

    @Gaurav you can also substitute the connector we use with the one you have. However this approach is not fully tested. There might be issues with backwards compatibility of the connectors - you should check if there have been breaking changes in the code base of the connector. I have managed to upgrade the connector on a Sitefinity website using <bindingRedirect> approach. What I have done is to
    1) Open my website in VS
    2) Replace the MySql.Data assembly with the latest one available for download - version 6.3.4.0
    3) Modify the web.config to add the binding redirect:
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727">
            ...
            <dependentAssembly>
                <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
                <bindingRedirect oldVersion="5.0.7.0" newVersion="6.3.4.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>

    Please note that this approach is not fully tested and there might be cases where problems arise. It is up to you to decide which approach to use.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  4. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    03 Sep 2010
    Link to this post
    Thank you George & Radoslav Georgiev
    I will check all these options and get back.

    Regards,
    Gaurav
  5. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    03 Sep 2010
    Link to this post
    Hi Radoslav Georgiev,

    your suggestion of "binding redirect" work good for us.

    Thanks
    Gaurav
Register for webinar
5 posts, 1 answered