有關呼叫實時(JIT)除錯而不是此對話框的詳細資訊,
請參見此訊息的結尾。
************** 例外文本 **************
System.Data.SqlClient.SqlException (0x80131904): 在與 SQL Server 建立連接時出現與網路相關的或特定于實體的錯誤。未找到或無法訪問服務器。請驗證實體名稱是否正確并且 SQL Server 已配置為允許遠程連接。 (provider: Named Pipes Provider, error: 40 - 無法打開到 SQL Server 的連接) ---> System.ComponentModel.Win32Exception (0x80004005): 找不到網路路徑。
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
在 JBSSec.MsSqlHelper.get_Connection() 位置 F:\Works\CXF\專業版\金邦樹\代碼\JBSSec\DoAid\MsSqlHelper.cs:行號 44
在 JBSSec.MsSqlHelper.GetScalarString(String sql, SqlParameter[] values) 位置 F:\Works\CXF\專業版\金邦樹\代碼\JBSSec\DoAid\MsSqlHelper.cs:行號 215
在 JBSSec.frmSCDD.frmForm_Load(Object sender, EventArgs e) 位置 F:\Works\CXF\專業版\金邦樹\代碼\JBSSec\frmFunction\生產訂單\frmSCDD.cs:行號 341
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:53,State:0,Class:20
************** 已加載的程式集 **************
mscorlib
程式集版本:4.0.0.0
Win32 版本:4.7.3416.0 built by: NET472REL1LAST_B
基本代碼:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
JBSDLL
程式集版本:1.0.0.0
Win32 版本:1.0.0.0
基本代碼:file:///C:/Debug_JBSSec/JBSDLL.DLL
----------------------------------------
JBSSec
程式集版本:1.0.0.0
Win32 版本:1.0.0.0
基本代碼:file:///C:/Debug_JBSSec/JBSSec.EXE
----------------------------------------
System.Windows.Forms
程式集版本:4.0.0.0
Win32 版本:4.7.3324.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程式集版本:4.0.0.0
Win32 版本:4.7.3451.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程式集版本:4.0.0.0
Win32 版本:4.7.3221.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
程式集版本:4.0.0.0
Win32 版本:4.7.3221.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
程式集版本:4.0.0.0
Win32 版本:4.7.3324.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
程式集版本:4.0.0.0
Win32 版本:4.7.3429.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms.resources
程式集版本:4.0.0.0
Win32 版本:4.6.81.0 built by: NETFXREL2
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Data
程式集版本:4.0.0.0
Win32 版本:4.7.3260.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.resources
程式集版本:4.0.0.0
Win32 版本:4.6.81.0 built by: NETFXREL2
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Data.resources.dll
----------------------------------------
System.Transactions
程式集版本:4.0.0.0
Win32 版本:4.7.3221.0 built by: NET472REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
程式集版本:4.0.0.0
Win32 版本:4.6.81.0 built by: NETFXREL2
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
mscorlib.resources
程式集版本:4.0.0.0
Win32 版本:4.6.81.0 built by: NETFXREL2
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
************** JIT 除錯 **************
要啟用實時(JIT)除錯,
該應用程式或計算機的 .config 檔案(machine.config)的 system.windows.forms 節中必須設定
jitDebugging 值。
編譯應用程式時還必須啟用
除錯。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
啟用 JIT 除錯后,任何未經處理的例外
都將被發送到在此計算機上注冊的 JIT 除錯器,
而不是由此對話框處理。
uj5u.com熱心網友回復:
也不需要jit除錯。錯誤資訊很明顯了,不是資料庫連接字串有誤,就是SQL服務器沒有啟動。
uj5u.com熱心網友回復:
請驗證實體名稱是否正確并且 SQL Server 已配置為允許遠程連接。實在看不懂,先學一下基本的鏈接字串都包含那幾個部分組成。
uj5u.com熱心網友回復:
你的服務器沒開,或者你的連接字串就有問題uj5u.com熱心網友回復:
本機用mssql企業管理器連通了再說,微軟自己都聯不通。讓對方檢查mssql服務配置,檢查你的防火墻和對方防火墻規則如果微軟自己能連通,你代碼聯不通,在過來問
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/86352.html
下一篇:如何做一個定時小工具?
