当我尝试在仅安装 .NET 4.5.1 的计算机上运行针对 .NET 4.0 框架的 .NET 应用程序时。该应用程序通常在同一网络域内的 cca 50 计算机上运行,也在一台安装了 .NET 4.5.1 的 VS 2012 计算机上运行。只有在一台特定的机器上才会崩溃。
我在以下代码中收到“应用程序无响应”崩溃:
//This line actually opens the connection to SQL Server
var q = (from vlu in data.QVyrobniLinkaUzivateles where (vlu.WinLogin == Program.UserName) orderby vlu.Cislo select vlu);
MessageBox.Show("A"); //A is displayed
try
{
MessageBox.Show(q.ToString()); //Here I get the exception
LoggedInUser = (q).ToArray();
}
catch (Exception ex)
{
//--------------------------------------------------------------
MessageBox.Show(ex.Message);
//Application hangs here sometimes displayng the entire exception text,
//sometimes displaying only part of it, sometimes displaying nothing
//When I do not catch this exception then there is sometimes just unhandled exception without any detail in the Event log
//--------------------------------------------------------------
MessageBox.Show(ex.StackTrace);
}
MessageBox.Show("B"); //B is never displayed
然后应用程序挂起 MessageBox.Show(ex.Message); 它显示应用程序停止工作等。
MessageBox(灰显且无响应)有时什么也不显示,有时会显示以下文字:
A connection was successfully established with the server but an error occured during the login process (provider: SSL provider, error: 0 The message received was unexpected or badly formatted)
会不会和这个有关?
http://support.microsoft.com/kb/2915689
如何修复连接到 SQL Server 的错误:SSL 提供程序,错误:0 - 收到的消息意外或格式错误
什么可能导致问题以及您会建议哪些步骤来解决此问题?