Bonjour,
je débute mono et la j'ai réussi a crée une application Console,
jusque la tout va bien, sauf que après j'ai voulue que mon application se connecte à ma base de donnée Mysql.
j'ai installé un serveur Apache+PHP+PHPmyadmin tout marche très bien et j'arrive à accéder à ma base de donnée via le navigateur.
j'ai aussi téléchargé "mysql-connector-odbc-5.2.4-linux-glibc2.5-x86-64bit.tar"
je l'ai extraire et j'ai eu mes fameux dll (voir PJ)
j'ai intégré mysql.data.dll dans mon projet
maintenant quand je lance mon projet il ne s’exécute pas, voici un extrait de mon code :
hors ce code ne fonctionne pas tant que j'ajoute la ligne :Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 using System; using Alta.Net; // bibliothèque network socket using System.Net; using MySql.Data.MySqlClient; namespace SERVER { class MainClass { public static ServerHandler server = new ServerHandler(); private MySqlConnection connection; //<--- le problème public static void Main (string[] args) { // quelque ligne de code pour socket ... Console.WriteLine("Server's external IP : " + ClientData.ExternalIP); Console.WriteLine("Server's internal IP : " + ClientData.InternalIP); Console.WriteLine("Server Started. Press a key to stop and exit."); Console.WriteLine("---------------------------------------------"); Console.ReadKey(); } } }
mon programme se met en mode débogage et après j’obtiens l'erreur suivante :Code:private MySqlConnection connection;
quand j'élimine cette ligneCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 * Assertion at debugger-agent.c:4349, condition `tls->frame_count' not met Stacktrace: Native stacktrace: /usr/bin/mono() [0x80e6431] [0xb770240c] [0xb7702424] /lib/i386-linux-gnu/libc.so.6(gsignal+0x4f) [0xb751d1df] /lib/i386-linux-gnu/libc.so.6(abort+0x175) [0xb7520825] /usr/bin/mono() [0x82189f7] /usr/bin/mono() [0x8218a73] /usr/bin/mono() [0x8108b4f] /usr/bin/mono() [0x810933b] /usr/bin/mono() [0x820a033] /usr/bin/mono() [0x822b888] /lib/i386-linux-gnu/libpthread.so.0(+0x6d4c) [0xb769fd4c] /lib/i386-linux-gnu/libc.so.6(clone+0x5e) [0xb75ddd3e] Debug info from gdb: Could not attach to process. If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf ptrace: Operation not permitted. No threads. ================================================================= Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= bash: line 1: 11227 Aborted (core dumped) /usr/bin/mono --debug --debugger-agent=transport=dt_socket,address=127.0.0.1:36967 "/home/the-morpher/SERVER/SERVER/bin/Debug/SERVER.exe" Press any key to continue...
mon programme marche très bien.Code:private MySqlConnection connection;
une idée svp ? :cry:
j'ai aussi pensé a ajouté tout les dll de la bibliothèque dans mon projet mais rien de spécial.