gpt4 book ai didi

c# - .net mysql 连接失败——系统在尝试在调用中使用指针参数时检测到无效的指针地址

转载 作者:太空宇宙 更新时间:2023-11-03 10:57:31 25 4
gpt4 key购买 nike

我当时在做一个相当中等水平的项目。Mysql 连接和其他东西工作得很好,但后来在项目接近尾声时突然出现了一个神奇的错误。

-- 系统在尝试在调用中使用指针参数时检测到无效指针地址。

查看调试窗口:

'Santima Accounting Software.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Santima Accounting Software.vshost.exe Error: 0 : The system detected an invalid pointer address in attempting to use a pointer argument in a call
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in MySql.Data.dll
The thread 'vshost.RunParkingWindow' (0x3ec) has exited with code 0 (0x0).
The thread '<No Name>' (0xe18) has exited with code 0 (0x0).
The program '[2040] Santima Accounting Software.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).

-- 我已经尝试了一些方法来解决它--

1 > restarting the computer.
2 > Re installation of mysql connector.
3 > reinstalling wamp.
4 > searching google a lot and change a lot things in mysql settings.
5 > Running project on different computer works fine but not in mine.

没有什么帮助我。我也发现很多人和我有同样的问题,但没有任何解决方案。

我的设置以及我的项目设置方式:

我正在为本地环境使用最新的 wamp。我同时使用 visual studio 2010、2012 Express Edition。我正在使用最新的 mysql 连接器。

mysql 上的用户结构:

请有人帮我摆脱这个垃圾。

最佳答案

虽然这个问题是将近两年前的报道,但我打算写下我的答案,希望有人觉得这些信息有用。这是我的环境:

  1. WIN7 X64

  2. VS2012终极版

  3. MYSQL 服务器 5.6.23 X86

  4. MySQL for Visual Studio 1.2.3 X86

  5. MySQL连接器/NET 6.9.5 X86

当我尝试通过VS2012 IDE(NOT CODE)连接mysql时,出现如下错误:

the system detected an invalid pointer address in attemping to use a pointer argument in a call

最后,我发现这个问题与LSP(layered service provider)有关。我的计算机的 LSP 被某些 Web 加速器软件破坏了。

使用CMD命令行,执行如下命令修复LSP:

netsh winsock reset

当然,您可以使用其他专门的工具来修复它。

关于c# - .net mysql 连接失败——系统在尝试在调用中使用指针参数时检测到无效的指针地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19011876/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com