PDA

View Full Version : مشکل اتصال برنامه تحت ویندوز به MySQL روی سرور اینترنتی در ویندوز XP



krasus
چهارشنبه 14 خرداد 1393, 12:15 عصر
سلام
یه برنامه ساده نوشتم که به دیتابیس MySQL روی هاست لینوکس وصل میشه و یه دستور SELECT ساده به دیتابیس میده و اطلاعات رو در دیتاگریدویو نمایش میده. اما مشکل اینجاست که برنامه من توی ویندوز xp بد کار می کنه. یعنی فرم لود میشه و موقعی که روی دکمه ای که دستور SELECT رو توش قرار دادم کلیک می کنم ارور زیر رو میده :
119869
و اینم از متن کامل دیتیلز :
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
at MySql.Data.MySqlClient.MySqlConnection.AssertPermi ssions()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at WindowsFormsApplication20.Form1.button1_Click(Obje ct sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The action that failed was:
InheritanceDemand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
Intranet




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsFormsApplication20
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///Z:/Documents/online%20Quiz/WindowsFormsApplication20/WindowsFormsApplication20/bin/Debug/WindowsFormsApplication20.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
MySql.Data
Assembly Version: 6.7.4.0
Win32 Version: 6.7.4.0
CodeBase: file:///Z:/Documents/online%20Quiz/WindowsFormsApplication20/WindowsFormsApplication20/bin/Debug/MySql.Data.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.


For example:


<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.





این برنامه کلا یه فایل exe و یه فای dll به اسم mysql.data.dll برای اتصال به mysql داره.
مشکل از کجاست ؟

aminbrleevb
شنبه 07 تیر 1393, 08:50 صبح
لطفا به سوال این دوستمون پاسخ بدین - سوال منم هست

shahryari
شنبه 07 تیر 1393, 09:45 صبح
1- آیا فقط در اکس پی این مشکل است؟
2- ورژن کانکتور مای اس کیوال چنده؟ آیا با دات نت فریمورک نصب شده روی سیستم همخوانی داره؟
3- کدهای سلکت ، پلیز..