[英]Using MySQL Connector/NET with NHibernate web application
I have an IIS server with MySQL Connector/NET version 6.2.3 installed on it. 我有一个安装了MySQL Connector / NET版本6.2.3的IIS服务器。 I'm using NHibernate, and I'm not entirely sure how to set up my web application to use this driver.
我正在使用NHibernate,但我不完全确定如何设置Web应用程序以使用此驱动程序。 Am I correct in saying that I can use any version of the .NET connector so long as it's referenced by the application?
我是否正确地说我可以使用任何版本的.NET连接器,只要它被应用程序引用即可? If so, where/how do I reference the driver in Web.config?
如果是这样,我在哪里/如何在Web.config中引用驱动程序?
I initially was using version 6.3.6, which had an installer and didn't require me to add any references in my project. 我最初使用版本6.3.6,该版本具有安装程序,不需要我在项目中添加任何引用。 However, upon deploying to the server, I discovered that the version installed there was 6.2.3, which gave this error:
但是,在部署到服务器时,我发现那里安装的版本为6.2.3,从而出现此错误:
Unable to find the requested .Net Framework Data Provider. It may not be installed.
I figured it out. 我想到了。 Just needed to set
providerName
to MySql.Data.MySqlClient
in connectionStrings
. 只需在
connectionStrings
中将providerName
设置为MySql.Data.MySqlClient
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.