Entity Framework with MySQL connector in c#
I have been trying to get the Entity Framework to work in my web application using MySQL. It works fine on my local pc, but doesn't work when I put it on the server.
Since the server is a shared server I can install the connector if that is the i开发者_如何学JAVAssue.
Your shared web host may restrict you to Medium Trust. There are known issues with using some db connectors like Devart in a medium trust environment. In your desktop/dev you are probably running in Full Trust.
Try setting your site to medium trust in web.config... see if you can duplicate the error.
How To: Is there a way to simulate medium trust in VS2010
I am currently looking into solutions... but may have to simply change hosts.
You should be able to put the MySQL.Data.Dll file in your BIN file.
place mysql.data.dll inside you Bin folder of the application.
this should rn on a medium trusted server even. if you do not know about it and still have the problem please contact your hosting provider and ask him to install mySqlConnector on server.
You must add provider library to bin directory in your web application and register provider in your web.config.
精彩评论