问题
We're using MySQL (5.0.x) on Windows, in an ASP.NET MVC app. Recently, we started using NHibernate in a lot of places, and it works great in the ASP.NET app.
On Vista and Windows Server 2008, it still works great everywhere. We've also got a couple command-line tools that use the same codebase, and they work everywhere except on our Windows Server 2003 boxes (otherwise identical to the WS2K8 in every way we can imagine). It seems to be having trouble making connections:
TIMESTAMP_HERE [1] WARN NHibernate.Util.ADOExceptionReporter - MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Our.Common.Services.OurConnectionProvider.GetConnection() inc:\OUR_CODE\blah...\OurConnectionProvider.cs:line 99
at NHibernate.Impl.SessionFactoryImpl.OpenConnection()
Does this sound familiar to anybody? Is there any way in which W2K3 would be different from W2K8/Vista that would affect NHibernate making connections to MySQL?
来源:https://stackoverflow.com/questions/936486/nhibernate-mysql-windows-server-2003-connection-problems