views:

453

answers:

2

Application was initially developed in VS 2008. It uses MySQL.data.dll for connecting to MySQL database. Application runs perfectly fine in Windows.

But production environment is Debian with mono.

Now copied entire solution in the Debian box. Entire solution opens in monodevelop correctly. It doesn't throw any error in building. But while running - it throws following error –

The file sending is in process..........

Error: System.EntryPointNotFoundException: CreateSemaphore
  at (wrapper managed-to-native) MySql.Data.Common.Semaphore:CreateSemaphore (MySql.Data.Common.SECURITY_ATTRIBUTES&,int,int,string)
  at MySql.Data.Common.Semaphore..ctor (Int32 initialCount, Int32 maximumCount) [0x00000] 
  at (wrapper remoting-invoke-with-check) MySql.Data.Common.Semaphore:.ctor (int,int)
  at MySql.Data.MySqlClient.MySqlPool..ctor (MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000] 
  at MySql.Data.MySqlClient.MySqlPoolManager.GetPool (MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000] 
  at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000]
A: 

Semaphore (as used here) is a Windows-only feature. I'm guessing you'll need a version of the client that is specifically compatible with Mono. You may want to look at the MySQL section of the Mono site and go from there.

bobbymcr
+1  A: 

Thanks. I could also locate the issue. Need the latest version of MySQL connector. Also need to Pooling= false in connection string.

If the answer I gave was helpful, you should upvote/accept it! :)
bobbymcr