最近发现一直在使用的Database.NET软件无法正常使用了,表现为当尝试进行Sql Server的连接创建时,直接报错

在事件查看器具体错误信息为:

日志名称:          Application

来源:            .NET Runtime

日期:            2015/6/13 21:05:56

事件 ID:         1026

任务类别:          无

级别:            错误

关键字:           经典

用户:            暂缺

计算机:           LAH-PC

描述:

应用程序: Database4.exe

Framework 版本: v4.0.30319

说明: 由于未经处理的异常,进程终止。

异常信息: System.AccessViolationException

堆栈:

在 SNINativeMethodWrapper.SNIClose(IntPtr)

在 System.Data.SqlClient.SNIHandle.ReleaseHandle()

在 System.Runtime.InteropServices.SafeHandle.InternalDispose()

在 System.Runtime.InteropServices.SafeHandle.Dispose(Boolean)

在 System.Runtime.InteropServices.SafeHandle.Dispose()

在 System.Data.SqlClient.TdsParserStateObject.Dispose()

在 System.Data.SqlClient.TdsParser.Disconnect()

在 System.Data.SqlClient.SqlInternalConnectionTds.LoginFailure()

在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(System.Data.ProviderBase.TimeoutTimer, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SqlCredential, System.String, System.Security.SecureString, Boolean)

在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(System.Data.ProviderBase.DbConnectionPoolIdentity, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SqlCredential, System.Object, System.String, System.Security.SecureString, Boolean, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SessionData)

在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(System.Data.Common.DbConnectionOptions, System.Data.Common.DbConnectionPoolKey, System.Object, System.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection, System.Data.Common.DbConnectionOptions)

在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionPoolGroup, System.Data.Common.DbConnectionOptions)

在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(System.Data.Common.DbConnection, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions, System.Data.ProviderBase.DbConnectionInternal, System.Data.ProviderBase.DbConnectionInternal ByRef)

在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)

在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)

在 System.Data.SqlClient.SqlConnection.TryOpenInner(System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>)

在 System.Data.SqlClient.SqlConnection.TryOpen(System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>)

在 System.Data.SqlClient.SqlConnection.Open()

在 gVariables5.[1](System.String)

在 frmMain.(System.String, Boolean)

在 frmMain.(DatabaseType)

在 frmMain.œ[1](System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripMenuItem.OnClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStripItem.PerformClick()

在 frmMain.‚[1](System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripMenuItem.OnClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)

在 System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)

在 System.Windows.Forms.ToolStripDropDown.OnMouseUp(System.Windows.Forms.MouseEventArgs)

在 System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)

在 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.ToolStripDropDown.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)

在 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)

在 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)

在 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)

在 System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)

在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])

在 ..(System.String[])

事件 Xml:

<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='.NET Runtime'/><EventID Qualifiers='0'>1026</EventID><Level>2</Level><Task>0</Task><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime='2015-06-13T13:05:56.000000000Z'/><EventRecordID>39388</EventRecordID><Channel>Application</Channel><Computer>LAH-PC</Computer><Security/></System><EventData><Data>应用程序: Database4.exe

Framework 版本: v4.0.30319

说明: 由于未经处理的异常,进程终止。

异常信息: System.AccessViolationException

堆栈:

在 SNINativeMethodWrapper.SNIClose(IntPtr)

在 System.Data.SqlClient.SNIHandle.ReleaseHandle()

在 System.Runtime.InteropServices.SafeHandle.InternalDispose()

在 System.Runtime.InteropServices.SafeHandle.Dispose(Boolean)

在 System.Runtime.InteropServices.SafeHandle.Dispose()

在 System.Data.SqlClient.TdsParserStateObject.Dispose()

在 System.Data.SqlClient.TdsParser.Disconnect()

在 System.Data.SqlClient.SqlInternalConnectionTds.LoginFailure()

在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(System.Data.ProviderBase.TimeoutTimer, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SqlCredential, System.String, System.Security.SecureString, Boolean)

在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(System.Data.ProviderBase.DbConnectionPoolIdentity, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SqlCredential, System.Object, System.String, System.Security.SecureString, Boolean, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SessionData)

在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(System.Data.Common.DbConnectionOptions, System.Data.Common.DbConnectionPoolKey, System.Object, System.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection, System.Data.Common.DbConnectionOptions)

在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionPoolGroup, System.Data.Common.DbConnectionOptions)

在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(System.Data.Common.DbConnection, System.Threading.Tasks.TaskCompletionSource`1&lt;System.Data.ProviderBase.DbConnectionInternal&gt;, System.Data.Common.DbConnectionOptions, System.Data.ProviderBase.DbConnectionInternal, System.Data.ProviderBase.DbConnectionInternal ByRef)

在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1&lt;System.Data.ProviderBase.DbConnectionInternal&gt;, System.Data.Common.DbConnectionOptions)

在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1&lt;System.Data.ProviderBase.DbConnectionInternal&gt;, System.Data.Common.DbConnectionOptions)

在 System.Data.SqlClient.SqlConnection.TryOpenInner(System.Threading.Tasks.TaskCompletionSource`1&lt;System.Data.ProviderBase.DbConnectionInternal&gt;)

在 System.Data.SqlClient.SqlConnection.TryOpen(System.Threading.Tasks.TaskCompletionSource`1&lt;System.Data.ProviderBase.DbConnectionInternal&gt;)

在 System.Data.SqlClient.SqlConnection.Open()

在 gVariables5.[1](System.String)

在 frmMain.(System.String, Boolean)

在 frmMain.(DatabaseType)

在 frmMain.œ[1](System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripMenuItem.OnClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStripItem.PerformClick()

在 frmMain.‚[1](System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)

在 System.Windows.Forms.ToolStripMenuItem.OnClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)

在 System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)

在 System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)

在 System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)

在 System.Windows.Forms.ToolStripDropDown.OnMouseUp(System.Windows.Forms.MouseEventArgs)

在 System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)

在 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.ToolStripDropDown.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)

在 System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)

在 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)

在 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)

在 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)

在 System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)

在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])

在 ..(System.String[])

</Data></EventData></Event>

作为付费用户,当然和作者邮件确认,最后发现是.NET Framework 4.5.1的问题,升级4.5.2后解决。具体解释可参考此网页

在安装了 Microsoft Visual Studio 2013或 Microsoft.NET Framework 4.5.1 的计算机上,使用 System.Data.SqlClient 通过 TCP 端口连接 SQL Server 会导致应用程序崩溃。另外,应用程序引发System.AccessViolationException异常。
注意:当应用程序遇到了此问题时,创建不同的调用堆栈。下面的示例演示这种情况下的典型调用堆栈模式。

安装.NET Framework后程序无法启动的错误处理的更多相关文章

  1. 【Maven】Eclipse安装Maven插件后导致Eclipse启动出错

    本文纯属复制粘贴:具体请参照原文: Eclipse安装Maven插件后,Eclipse启动问题:Maven Integration for Eclipse JDK Warning.  解决方法: 1. ...

  2. MySQL程序端启动密码错误解决方法

    MySQL程序端启动密码错误解决方法 一般启动MySQL程序端,都是用mysql -uroot -p命令,当然前提是你的环境变量已经配好了. 为了连接服务器,当调用mysql时,通常需要提供一个MyS ...

  3. 安装完Framework后如何不重启系统?

    在.net平台下客户端部署时,如果客户端没有安装Framework时,部署程序安装Framework后,有一个要求重启选项,当然是非强制的.如果不想出现这个提示“重启”选项,可以做如下选择: 1.启动 ...

  4. 安装新版xampp后apache无法启动提示:Apache Service detected with wrong path解决方案

    我以前安装过xampp,因为学习thingPHP需要升级PHP5.0以上,所以我就卸掉了xampp,从新安装新版本的xampp其中PHP是最新版的,但是安装后启动xampp提示如下:Apache Se ...

  5. mac下 安装tomcat 后项目无法启动以及 错误 找不到或无法加载主类

    按照网上的步骤,在mac上安装tomcat后,写个简单的测试类报错:错误 找不到或无法加载主类 Class JavaLaunchHelper is implemented in both /Libra ...

  6. Mysql-win免安装卸载服务后重新安装不能启动的问题

    一.先看配置文件有没有问题,以下是一个简单的配置 [mysql] default-character-set=utf8 [mysqld] character-set-server=utf8 port ...

  7. centos下yum安装mysql5.6后,无法启动 MySQL Daemon failed to start

    如果是全新安装应该就不会出现这个问题,升级安装的话,要运行 mysql_upgrade ,但是启动MYSQL就报错MySQL Daemon failed to start 如此就没办法运行mysql_ ...

  8. CentOS 6.5 安装Nvidia驱动后出现"no screens found "错误

    参考官网文档 http://cn.download.nvidia.com/XFree86/Linux-x86_64/280.13/README/editxconfig.html 进入更改文档: vi ...

  9. 害人的VS2008,manifest导致“应用程序配置不正确,应用程序未能启动”

    在VC++2008的项目中,如何显示地指定要使用的C++库的版本? 开发环境:VS2008 SP1 + Win2003 SP2         因为我的VS2008安装了SP1补丁,所以有了9.0.3 ...

随机推荐

  1. SQL Server调优系列玩转篇三(利用索引提示(Hint)引导语句最大优化运行)

    前言 本篇继续玩转模块的内容,关于索引在SQL Server的位置无须多言,本篇将分析如何利用Hint引导语句充分利用索引进行运行,同样,还是希望扎实掌握前面一系列的内容,才进入本模块的内容分析. 闲 ...

  2. 烂泥:mysql数据库使用的基本命令

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 1.连接数据库的格式 mysql -h IP -u用户名 -p密码; 1.1连接远程数据库 mysql -h 192.168.1.214 -uroot ...

  3. 烂泥:【解决】NFS服务器使用showmount –e命令报错

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 今天在NFS服务器使用showmount –e查看NFS共享目录时,发现系统一直显示如下错误: clnt_create: RPC: Port mappe ...

  4. C++STL - vector

    对vector进行一些总结. 一些需要注意的知识点: 1.标准库vector表示对象的集合, 其中所有对象的类型都相同.因为vector中容纳着其他对象,所以也称作容器. 2.C++语言既有类模板(c ...

  5. Windows 安装ELK

    在Windows服务器上安装ELK logstash在windows平台下不能监控磁盘文件,用nxlog代替,监控文件并把内容发送到logstash 部署环境 Os :Windows 7 logsta ...

  6. mysql优化之索引篇

    对mysql优化是一个综合性的技术,主要包括 a: 表的设计合理化(符合3NF) b: 添加适当索引(index) [四种: 普通索引.主键索引.唯一索引unique.全文索引] c: 分表技术(水平 ...

  7. eclipse 提示错误**cannot be resolved to a type

    这是某个对象不能识别为类型,比如你写了个类,名字叫Hello,如果你调用它的时候不小心写成hello,或者helo,那么就会报这样的错误,很容易改正的,只要你细心一点

  8. GNU C 内联汇编介绍

    GNU C 内联汇编介绍 简介 1.很早之前就听说 C 语言能够直接内嵌汇编指令.但是之前始终没有去详细了解过.最近由于某种需求,看到了相关的 C 语言代码.也就自然去简单的学习了一下如何在 C 代码 ...

  9. Arch Linux sudo: PAM authentication error: Module is unknown [Solved!]

    问题描述: 我的 Arch Linux 已经用了快半年多,由于 Arch Linux 的滚挂问题,我从没有直接升级过系统.软件版本以及库自然落后了一些. 就在我准备需要用到 NFS 时,挂载网络文件系 ...

  10. Android中事件传递机制的总结

    事件传递虽然算不上某个单独的知识点,但是在实际项目开发中肯定会碰到,如果不明白其中的原理,那在设计各种滑动效果时就会感到很困惑. 关于事件的传递,我们可能会有以下疑问: 事件是如何传递的 事件是如何处 ...