<add name="dbConn"
connectionString="Data Source=yxudiservice.bosdsoft.com,9868;Initial Catalog=yxudiservice;Persist Security Info=True;User ID=UDISEV;Password=BOSD*3574&soFt#2486%" providerName="System.Data.SqlClient" /> <connectionStrings> <add name="dbConn" connectionString="Data Source=.;Initial Catalog=YXUDI_update;Persist Security Info=True;User ID=UDIUDP;Password=BOSD*3574#soft*2486%" providerName="System.Data.SqlClient" /> </connectionStrings> 数据库连接串密码转码
0:000> !pe Exception object: 000000000351f608 Exception type: System.Data.SqlClient.SqlException Message: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接) InnerException: System.ComponentModel.Win32Exception, Use !PrintException 000000000351f0a0 to see more. StackTrace (generated): SP IP Function 0000000000DC6FE0 00007FFBDDCD5954 System_Data_ni!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.ProviderBase.DbConnectionPool, System.String, Boolean, System.Data.SqlClient.SqlAuthenticationProviderManager)+0x5f4 0000000000DCDBB0 00007FFBDDCD5083 System_Data_ni!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)+0x1d3 0000000000DCDCB0 00007FFBDDCD4E96 System_Data_ni!System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection
0:000> !do poi(0000000000DCDBB0+0n16) / !do poi(poi(0000000000DCDBB0+0n16)+0x8) Name: System.Data.SqlClient.SqlConnectionString MethodTable: 00007ffbddb5af80 EEClass: 00007ffbddbe20f0 Size: 232(0xe8) bytes File: C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll Fields: MT Field Offset Type VT Attr Value Name 00007ffc2c6459c0 4001cbc 8 System.String 0 instance 00000000035060c0 _usersConnectionString
0:000> !do 00000000035060c0
Name: System.String
MethodTable: 00007ffc2c6459c0
EEClass: 00007ffc2c622ec0
Size: 140(0x8c) bytes
File: C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
String: Data Source=sa;Initial Catalog=dycw;User ID=sa;Password=1 这个连接串,无效写错了导至连不上数据库。

--
0:000> bu System_Windows_Forms_ni!System.Windows.Forms.Control.OnClick breakpoint 39 redefined g 0:000> !clrstack -a OS Thread Id: 0x3c34 (0) Child SP IP Call Site 00000000008fa108 00007ff8eb4746c0 System.Windows.Forms.Control.OnClick(System.EventArgs) PARAMETERS: this (<CLR reg>) = 0x00000000029ba688 e (<CLR reg>) = 0x000000000299b5b0 LOCALS: <no data> 0:000> !DumpObj /d 00000000029ba688 Name: System.Windows.Forms.Button MethodTable: 00007ff8eb1e0298 EEClass: 00007ff8eb2921c0 Size: 264(0x108) bytes File: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll Fields: MT Field Offset Type VT Attr Value Name 00007ff92dc159c0 4000827 40 System.String 0 instance 00000000029ca610 text 0:000> !DumpObj /d 00000000029ca610 Name: System.String MethodTable: 00007ff92dc159c0 EEClass: 00007ff92dbf2ec0 Size: 42(0x2a) bytes File: C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll String: 测试连接(&T) 0:000> !dumpstack OS Thread Id: 0x3c34 (0) Current frame: clr!JIT_InitPInvokeFrame Child-SP RetAddr Caller, Callee 00000000008f9fc0 00007ff8eb4b626b (MethodDesc 00007ff8eb25bb28 +0x2b System.Windows.Forms.Cursor.get_CurrentInternal()), calling clr!JIT_InitPInvokeFrame 00000000008fa000 00007ff943482b33 gdi32full!UspFreeAnalysisMem+0x13, calling gdi32full!CheckInitUspMemory 00000000008fa020 00007ff931ce4e85 clr!JIT_InitPInvokeFrame+0x15, calling clr!GetThread 00000000008fa070 00007ff8d27e6b08 (MethodDesc 00007ff8d28920f0 +0x18 Microsoft.Data.ConnectionUI.DataConnectionDialog.TestConnection(System.Object, System.EventArgs)), calling (MethodDesc 00007ff8eb25bb28 +0 System.Windows.Forms.Cursor.get_CurrentInternal()) 00000000008fa080 00007ff92b93f728 (MethodDesc 00007ff92b6f1040 +0x58 System.ComponentModel.EventHandlerList.get_Item(System.Object)), calling 00007ff8d26beba0 00000000008fa0c0 00007ff8eb474747 (MethodDesc 00007ff8eb25db60 +0x87 System.Windows.Forms.Control.OnClick(System.EventArgs)) 00000000008fa100 00007ff8eb477b83 (MethodDesc 00007ff8eb331268 +0xc3 System.Windows.Forms.Button.OnClick(System.EventArgs)), calling (MethodDesc 00007ff8eb25db60 +0 System.Windows.Forms.Control.OnClick(System.EventArgs)) 00000000008fa110 00007ff9462119d8 USER32!DT_DrawStr+0xb0, calling USER32!guard_dispatch_icall_nop !name2ee System_Windows_Forms_ni System.Windows.Forms.Cursor.set_Current bp 00007ff9011e6710 jit code address 0:000> !dumpil 00007ff8d28920f0 ilAddr = 000000001edd5d34 IL_0000: call System.Windows.Forms.Cursor::get_Current USER32!NtUserGetCursor IL_0005: stloc.0 IL_0006: call System.Windows.Forms.Cursors::get_WaitCursor IL_000b: call System.Windows.Forms.Cursor::set_Current System_Windows_Forms_ni!System.Windows.Forms.Cursor.set_Current .try { IL_0010: ldarg.0 IL_0011: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_ConnectionProperties IL_0016: callvirt Microsoft.Data.ConnectionUI.IDataConnectionProper::Test IL_001b: leave.s IL_0037 } // end .try .catch { IL_001d: stloc.1 IL_001e: ldloc.0 IL_001f: call System.Windows.Forms.Cursor::set_Current IL_0024: ldarg.0 IL_0025: ldstr "DataConnectionDialog_TestResults" IL_002a: call Microsoft.Data.ConnectionUI.SR::GetString IL_002f: ldloc.1 IL_0030: call Microsoft.Data.ConnectionUI.DataConnectionDialog::ShowError IL_0035: leave.s IL_0057 } // end .catch IL_0037: ldloc.0 IL_0038: call System.Windows.Forms.Cursor::set_Current IL_003d: ldarg.0 IL_003e: ldstr "DataConnectionDialog_TestResults" IL_0043: call Microsoft.Data.ConnectionUI.SR::GetString IL_0048: ldstr "DataConnectionDialog_TestConnectionSucceeded" IL_004d: call Microsoft.Data.ConnectionUI.SR::GetString IL_0052: call Microsoft.Data.ConnectionUI.DataConnectionDialog::ShowMessage IL_0057: ret clr!JIT_New clr!LazyMachStateCaptureState [0x0] System_Windows_Forms_ni!System.Windows.Forms.Cursor..ctor + 0x32 0:000> !U /d 00007ff8d27dd11a Normal JIT generated code Microsoft.Data.ConnectionUI.DataConnectionDialog.get_ConnectionProperties() Begin 00007ff8d27dd0f0, size 31f 00007ff8`d27dd0f0 55 push rbp 00007ff8`d27dd0f1 57 push rdi 00007ff8`d27dd0f2 56 push rsi 00007ff8`d27dd0f3 53 push rbx 00007ff8`d27dd0f4 4883ec38 sub rsp,38h 00007ff8`d27dd0f8 488d6c2450 lea rbp,[rsp+50h] 00007ff8`d27dd0fd 488965d0 mov qword ptr [rbp-30h],rsp 00007ff8`d27dd101 48894d10 mov qword ptr [rbp+10h],rcx 00007ff8`d27dd105 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd109 e87ac2ffff call 00007ff8`d27d9388 00007ff8`d27dd10e 488bd0 mov rdx,rax 00007ff8`d27dd111 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd115 e88ec2ffff call 00007ff8`d27d93a8 >>> 00007ff8`d27dd11a 4885c0 test rax,rax 00007ff8`d27dd11d 750b jne 00007ff8`d27dd12a 00007ff8`d27dd11f 33c0 xor eax,eax 00007ff8`d27dd121 488d65e8 lea rsp,[rbp-18h] 00007ff8`d27dd125 5b pop rbx 00007ff8`d27dd126 5e pop rsi 00007ff8`d27dd127 5f pop rdi 00007ff8`d27dd128 5d pop rbp 00007ff8`d27dd129 c3 ret 00007ff8`d27dd12a 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd12e 488bb138020000 mov rsi,qword ptr [rcx+238h] 00007ff8`d27dd135 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd139 e84ac2ffff call 00007ff8`d27d9388 00007ff8`d27dd13e 488bd0 mov rdx,rax 00007ff8`d27dd141 488bce mov rcx,rsi 00007ff8`d27dd144 49bb18046cd2f87f0000 mov r11,7FF8D26C0418h 00007ff8`d27dd14e 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd150 ff15c232eeff call qword ptr [00007ff8`d26c0418] 00007ff8`d27dd156 84c0 test al,al 00007ff8`d27dd158 7551 jne 00007ff8`d27dd1ab 00007ff8`d27dd15a 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd15e 488bb138020000 mov rsi,qword ptr [rcx+238h] 00007ff8`d27dd165 48b9f0248dd2f87f0000 mov rcx,7FF8D28D24F0h (MT: System.Collections.Generic.Dictionary`2[[Microsoft.Data.ConnectionUI.DataProvider, Microsoft.Data.ConnectionUI.Dialog],[Microsoft.Data.ConnectionUI.IDataConnectionProperties, Microsoft.Data.ConnectionUI]]) 00007ff8`d27dd16f e8ec53505f call clr!JIT_TrialAllocSFastMP_InlineGetThread (00007ff9`31ce2560) 00007ff8`d27dd174 488bf8 mov rdi,rax 00007ff8`d27dd177 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd17b e808c2ffff call 00007ff8`d27d9388 00007ff8`d27dd180 488bd8 mov rbx,rax 00007ff8`d27dd183 488bcf mov rcx,rdi 00007ff8`d27dd186 33d2 xor edx,edx 00007ff8`d27dd188 4533c0 xor r8d,r8d 00007ff8`d27dd18b e8a0e3985b call mscorlib_ni!System.Collections.Generic.Dictionary`2..ctor (00007ff9`2e16b530) 00007ff8`d27dd190 488bce mov rcx,rsi 00007ff8`d27dd193 4c8bc7 mov r8,rdi 00007ff8`d27dd196 488bd3 mov rdx,rbx 00007ff8`d27dd199 49bb58046cd2f87f0000 mov r11,7FF8D26C0458h 00007ff8`d27dd1a3 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd1a5 ff15ad32eeff call qword ptr [00007ff8`d26c0458] 00007ff8`d27dd1ab 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd1af 488bb138020000 mov rsi,qword ptr [rcx+238h] 00007ff8`d27dd1b6 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd1ba e8c9c1ffff call 00007ff8`d27d9388 00007ff8`d27dd1bf 488bd0 mov rdx,rax 00007ff8`d27dd1c2 488bce mov rcx,rsi 00007ff8`d27dd1c5 49bb20046cd2f87f0000 mov r11,7FF8D26C0420h 00007ff8`d27dd1cf 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd1d1 ff154932eeff call qword ptr [00007ff8`d26c0420] 00007ff8`d27dd1d7 488bf0 mov rsi,rax 00007ff8`d27dd1da 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd1de e8a5c1ffff call 00007ff8`d27d9388 00007ff8`d27dd1e3 488bd0 mov rdx,rax 00007ff8`d27dd1e6 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd1ea e8b9c1ffff call 00007ff8`d27d93a8 00007ff8`d27dd1ef 488bd0 mov rdx,rax 00007ff8`d27dd1f2 488bce mov rcx,rsi 00007ff8`d27dd1f5 49bb28046cd2f87f0000 mov r11,7FF8D26C0428h 00007ff8`d27dd1ff 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd201 ff152132eeff call qword ptr [00007ff8`d26c0428] 00007ff8`d27dd207 84c0 test al,al 00007ff8`d27dd209 0f854e010000 jne 00007ff8`d27dd35d 00007ff8`d27dd20f 33c9 xor ecx,ecx 00007ff8`d27dd211 48894de0 mov qword ptr [rbp-20h],rcx 00007ff8`d27dd215 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd219 e86ac1ffff call 00007ff8`d27d9388 00007ff8`d27dd21e 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd222 483b8118020000 cmp rax,qword ptr [rcx+218h] 00007ff8`d27dd229 752a jne 00007ff8`d27dd255 00007ff8`d27dd22b 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd22f e854c1ffff call 00007ff8`d27d9388 00007ff8`d27dd234 488bd0 mov rdx,rax 00007ff8`d27dd237 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd23b e868c1ffff call 00007ff8`d27d93a8 00007ff8`d27dd240 488bc8 mov rcx,rax 00007ff8`d27dd243 33d2 xor edx,edx 00007ff8`d27dd245 488b00 mov rax,qword ptr [rax] 00007ff8`d27dd248 488b4040 mov rax,qword ptr [rax+40h] 00007ff8`d27dd24c ff5030 call qword ptr [rax+30h] 00007ff8`d27dd24f 488945e0 mov qword ptr [rbp-20h],rax 00007ff8`d27dd253 eb35 jmp 00007ff8`d27dd28a 00007ff8`d27dd255 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd259 e82ac1ffff call 00007ff8`d27d9388 00007ff8`d27dd25e 488bd0 mov rdx,rax 00007ff8`d27dd261 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd265 e83ec1ffff call 00007ff8`d27d93a8 00007ff8`d27dd26a 488bf0 mov rsi,rax 00007ff8`d27dd26d 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd271 e812c1ffff call 00007ff8`d27d9388 00007ff8`d27dd276 488bd0 mov rdx,rax 00007ff8`d27dd279 488bce mov rcx,rsi 00007ff8`d27dd27c 488b06 mov rax,qword ptr [rsi] 00007ff8`d27dd27f 488b4040 mov rax,qword ptr [rax+40h] 00007ff8`d27dd283 ff5030 call qword ptr [rax+30h] 00007ff8`d27dd286 488945e0 mov qword ptr [rbp-20h],rax 00007ff8`d27dd28a 48837de000 cmp qword ptr [rbp-20h],0 00007ff8`d27dd28f 7513 jne 00007ff8`d27dd2a4 00007ff8`d27dd291 48b9c0238dd2f87f0000 mov rcx,7FF8D28D23C0h (MT: Microsoft.Data.ConnectionUI.DataConnectionDialog+BasicConnectionProperties) 00007ff8`d27dd29b e8c052505f call clr!JIT_TrialAllocSFastMP_InlineGetThread (00007ff9`31ce2560) 00007ff8`d27dd2a0 488945e0 mov qword ptr [rbp-20h],rax 00007ff8`d27dd2a4 48b9300ec92df97f0000 mov rcx,offset mscorlib_ni!GetAbsoluteDatePersian+0x11 (00007ff9`2dc90e30) (MT: System.EventHandler) 00007ff8`d27dd2ae e8ad52505f call clr!JIT_TrialAllocSFastMP_InlineGetThread (00007ff9`31ce2560) 00007ff8`d27dd2b3 488bf0 mov rsi,rax 00007ff8`d27dd2b6 48837d1000 cmp qword ptr [rbp+10h],0 00007ff8`d27dd2bb 741d je 00007ff8`d27dd2da 00007ff8`d27dd2bd 488d4e08 lea rcx,[rsi+8] 00007ff8`d27dd2c1 488b5510 mov rdx,qword ptr [rbp+10h] 00007ff8`d27dd2c5 e8066d505f call clr!JIT_WriteBarrier (00007ff9`31ce3fd0) 00007ff8`d27dd2ca 48b9d0947dd2f87f0000 mov rcx,7FF8D27D94D0h 00007ff8`d27dd2d4 48894e18 mov qword ptr [rsi+18h],rcx 00007ff8`d27dd2d8 eb09 jmp 00007ff8`d27dd2e3 00007ff8`d27dd2da 488bce mov rcx,rsi 00007ff8`d27dd2dd e8cec91f5c call mscorlib_ni!System.MulticastDelegate.ThrowNullThisInDelegateToInstance (00007ff9`2e9d9cb0) 00007ff8`d27dd2e2 cc int 3 00007ff8`d27dd2e3 488b4de0 mov rcx,qword ptr [rbp-20h] 00007ff8`d27dd2e7 488bd6 mov rdx,rsi 00007ff8`d27dd2ea 49bb40046cd2f87f0000 mov r11,7FF8D26C0440h 00007ff8`d27dd2f4 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd2f6 ff154431eeff call qword ptr [00007ff8`d26c0440] 00007ff8`d27dd2fc 90 nop 00007ff8`d27dd2fd 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd301 488bb138020000 mov rsi,qword ptr [rcx+238h] 00007ff8`d27dd308 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd30c e877c0ffff call 00007ff8`d27d9388 00007ff8`d27dd311 488bd0 mov rdx,rax 00007ff8`d27dd314 488bce mov rcx,rsi 00007ff8`d27dd317 49bb48046cd2f87f0000 mov r11,7FF8D26C0448h 00007ff8`d27dd321 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd323 ff151f31eeff call qword ptr [00007ff8`d26c0448] 00007ff8`d27dd329 488bf0 mov rsi,rax 00007ff8`d27dd32c 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd330 e853c0ffff call 00007ff8`d27d9388 00007ff8`d27dd335 488bd0 mov rdx,rax 00007ff8`d27dd338 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd33c e867c0ffff call 00007ff8`d27d93a8 00007ff8`d27dd341 488bd0 mov rdx,rax 00007ff8`d27dd344 4c8b45e0 mov r8,qword ptr [rbp-20h] 00007ff8`d27dd348 488bce mov rcx,rsi 00007ff8`d27dd34b 49bb50046cd2f87f0000 mov r11,7FF8D26C0450h 00007ff8`d27dd355 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd357 ff15f330eeff call qword ptr [00007ff8`d26c0450] 00007ff8`d27dd35d 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd361 488bb138020000 mov rsi,qword ptr [rcx+238h] 00007ff8`d27dd368 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd36c e817c0ffff call 00007ff8`d27d9388 00007ff8`d27dd371 488bd0 mov rdx,rax 00007ff8`d27dd374 488bce mov rcx,rsi 00007ff8`d27dd377 49bb30046cd2f87f0000 mov r11,7FF8D26C0430h 00007ff8`d27dd381 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd383 ff15a730eeff call qword ptr [00007ff8`d26c0430] 00007ff8`d27dd389 488bf0 mov rsi,rax 00007ff8`d27dd38c 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd390 e8f3bfffff call 00007ff8`d27d9388 00007ff8`d27dd395 488bd0 mov rdx,rax 00007ff8`d27dd398 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27dd39c e807c0ffff call 00007ff8`d27d93a8 00007ff8`d27dd3a1 488bd0 mov rdx,rax 00007ff8`d27dd3a4 488bce mov rcx,rsi 00007ff8`d27dd3a7 49bb38046cd2f87f0000 mov r11,7FF8D26C0438h 00007ff8`d27dd3b1 488b058030eeff mov rax,qword ptr [00007ff8`d26c0438] 00007ff8`d27dd3b8 3909 cmp dword ptr [rcx],ecx 00007ff8`d27dd3ba 488d65e8 lea rsp,[rbp-18h] 00007ff8`d27dd3be 5b pop rbx 00007ff8`d27dd3bf 5e pop rsi 00007ff8`d27dd3c0 5f pop rdi 00007ff8`d27dd3c1 5d pop rbp 00007ff8`d27dd3c2 48ffe0 jmp rax 00007ff8`d27dd3c5 55 push rbp 00007ff8`d27dd3c6 57 push rdi 00007ff8`d27dd3c7 56 push rsi 00007ff8`d27dd3c8 53 push rbx 00007ff8`d27dd3c9 4883ec28 sub rsp,28h 00007ff8`d27dd3cd 488b6920 mov rbp,qword ptr [rcx+20h] 00007ff8`d27dd3d1 48896c2420 mov qword ptr [rsp+20h],rbp 00007ff8`d27dd3d6 488d6d50 lea rbp,[rbp+50h] 00007ff8`d27dd3da 488d05a9feffff lea rax,[00007ff8`d27dd28a] 00007ff8`d27dd3e1 4883c428 add rsp,28h 00007ff8`d27dd3e5 5b pop rbx 00007ff8`d27dd3e6 5e pop rsi 00007ff8`d27dd3e7 5f pop rdi 00007ff8`d27dd3e8 5d pop rbp 00007ff8`d27dd3e9 c3 ret 00007ff8`d27dd3ea 55 push rbp 00007ff8`d27dd3eb 57 push rdi 00007ff8`d27dd3ec 56 push rsi 00007ff8`d27dd3ed 53 push rbx 00007ff8`d27dd3ee 4883ec28 sub rsp,28h 00007ff8`d27dd3f2 488b6920 mov rbp,qword ptr [rcx+20h] 00007ff8`d27dd3f6 48896c2420 mov qword ptr [rsp+20h],rbp 00007ff8`d27dd3fb 488d6d50 lea rbp,[rbp+50h] 00007ff8`d27dd3ff 488d05f7feffff lea rax,[00007ff8`d27dd2fd] 00007ff8`d27dd406 4883c428 add rsp,28h 00007ff8`d27dd40a 5b pop rbx 00007ff8`d27dd40b 5e pop rsi 00007ff8`d27dd40c 5f pop rdi 00007ff8`d27dd40d 5d pop rbp 00007ff8`d27dd40e c3 ret 0:000> !U /d 00007ff8d27e6b23 Normal JIT generated code Microsoft.Data.ConnectionUI.DataConnectionDialog.TestConnection(System.Object, System.EventArgs) Begin 00007ff8d27e6af0, size cf 00007ff8`d27e6af0 55 push rbp 00007ff8`d27e6af1 56 push rsi 00007ff8`d27e6af2 4883ec38 sub rsp,38h 00007ff8`d27e6af6 488d6c2440 lea rbp,[rsp+40h] 00007ff8`d27e6afb 488965e0 mov qword ptr [rbp-20h],rsp 00007ff8`d27e6aff 48894d10 mov qword ptr [rbp+10h],rcx 00007ff8`d27e6b03 e838f7cc18 call System_Windows_Forms_ni!System.Windows.Forms.Cursor.get_CurrentInternal (00007ff8`eb4b6240) 00007ff8`d27e6b08 488945f0 mov qword ptr [rbp-10h],rax 00007ff8`d27e6b0c e80fc5cd18 call System_Windows_Forms_ni!System.Windows.Forms.Cursors.get_WaitCursor (00007ff8`eb4c3020) 00007ff8`d27e6b11 488bc8 mov rcx,rax 00007ff8`d27e6b14 e8f7fb4519 call System_Windows_Forms_ni!System.Windows.Forms.Cursor.set_Current (00007ff8`ebc46710) 00007ff8`d27e6b19 90 nop 00007ff8`d27e6b1a 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27e6b1e e80529ffff call 00007ff8`d27d9428 >>> 00007ff8`d27e6b23 488bc8 mov rcx,rax 00007ff8`d27e6b26 49bb40076cd2f87f0000 mov r11,7FF8D26C0740h 00007ff8`d27e6b30 3909 cmp dword ptr [rcx],ecx 00007ff8`d27e6b32 ff15089cedff call qword ptr [00007ff8`d26c0740] 00007ff8`d27e6b38 90 nop 00007ff8`d27e6b39 488b4df0 mov rcx,qword ptr [rbp-10h] 00007ff8`d27e6b3d e8cefb4519 call System_Windows_Forms_ni!System.Windows.Forms.Cursor.set_Current (00007ff8`ebc46710) 00007ff8`d27e6b42 488b0c2520389812 mov rcx,qword ptr [12983820h] ("DataConnectionDialog_TestResults") 00007ff8`d27e6b4a e85139ffff call 00007ff8`d27da4a0 (Microsoft.Data.ConnectionUI.SR.GetString(System.String), mdToken: 0000000006000262) 00007ff8`d27e6b4f 488bf0 mov rsi,rax 00007ff8`d27e6b52 488b0c2528389812 mov rcx,qword ptr [12983828h] ("DataConnectionDialog_TestConnectionSucceeded") 00007ff8`d27e6b5a e84139ffff call 00007ff8`d27da4a0 (Microsoft.Data.ConnectionUI.SR.GetString(System.String), mdToken: 0000000006000262) 00007ff8`d27e6b5f 4c8bc0 mov r8,rax 00007ff8`d27e6b62 488bd6 mov rdx,rsi 00007ff8`d27e6b65 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27e6b69 e88229ffff call 00007ff8`d27d94f0 00007ff8`d27e6b6e 90 nop 00007ff8`d27e6b6f 488d65f8 lea rsp,[rbp-8] 00007ff8`d27e6b73 5e pop rsi 00007ff8`d27e6b74 5d pop rbp 00007ff8`d27e6b75 c3 ret 00007ff8`d27e6b76 55 push rbp 00007ff8`d27e6b77 56 push rsi 00007ff8`d27e6b78 4883ec28 sub rsp,28h 00007ff8`d27e6b7c 488b6920 mov rbp,qword ptr [rcx+20h] 00007ff8`d27e6b80 48896c2420 mov qword ptr [rsp+20h],rbp 00007ff8`d27e6b85 488d6d40 lea rbp,[rbp+40h] 00007ff8`d27e6b89 488bf2 mov rsi,rdx 00007ff8`d27e6b8c 488b4df0 mov rcx,qword ptr [rbp-10h] 00007ff8`d27e6b90 e87bfb4519 call System_Windows_Forms_ni!System.Windows.Forms.Cursor.set_Current (00007ff8`ebc46710) 00007ff8`d27e6b95 488b0c2520389812 mov rcx,qword ptr [12983820h] ("DataConnectionDialog_TestResults") 00007ff8`d27e6b9d e8fe38ffff call 00007ff8`d27da4a0 (Microsoft.Data.ConnectionUI.SR.GetString(System.String), mdToken: 0000000006000262) 00007ff8`d27e6ba2 488bd0 mov rdx,rax 00007ff8`d27e6ba5 488b4d10 mov rcx,qword ptr [rbp+10h] 00007ff8`d27e6ba9 4c8bc6 mov r8,rsi 00007ff8`d27e6bac e84729ffff call 00007ff8`d27d94f8 (Microsoft.Data.ConnectionUI.DataConnectionDialog.ShowError(System.String, System.Exception), mdToken: 000000000600009a) 00007ff8`d27e6bb1 488d05b6ffffff lea rax,[00007ff8`d27e6b6e] 00007ff8`d27e6bb8 4883c428 add rsp,28h 00007ff8`d27e6bbc 5e pop rsi 00007ff8`d27e6bbd 5d pop rbp 00007ff8`d27e6bbe c3 ret !dumpstack OS Thread Id: 0x3c34 (0) Current frame: (MethodDesc 00007ff92ddbfb88 +0 System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].ContainsKey(System.__Canon)) Child-SP RetAddr Caller, Callee 00000000008f9fd0 00007ff8d27dcbb3 (MethodDesc 00007ff8d2891ef8 +0xa3 Microsoft.Data.ConnectionUI.DataConnectionDialog.GetSelectedDataProvider(Microsoft.Data.ConnectionUI.DataSource)), calling 00007ff8d26ce6c0 00000000008f9fe0 00007ff8d27dc97b (MethodDesc 00007ff8d2891eb8 +0x7b Microsoft.Data.ConnectionUI.DataConnectionDialog.get_SelectedDataSource()), calling 00007ff8d26ce660 00000000008f9ff0 00007ff92e17f459 (MethodDesc 00007ff92dddf870 +0x39 System.Security.CodeAccessPermission.Demand()), calling (MethodDesc 00007ff92df60448 +0 System.Security.CodeAccessSecurityEngine.Check(System.Security.CodeAccessPermission, System.Threading.StackCrawlMark ByRef)) 00000000008fa010 00007ff8d27dd11a (MethodDesc 00007ff8d2891ff8 +0x2a Microsoft.Data.ConnectionUI.DataConnectionDialog.get_ConnectionProperties()), calling 00007ff8d28a6b30 00000000008fa030 00007ff8ebc4674b (MethodDesc 00007ff8eb322d28 +0x3b System.Windows.Forms.Cursor.set_Current(System.Windows.Forms.Cursor)), calling (MethodDesc 00007ff8eb322d38 +0 System.Windows.Forms.Cursor.set_CurrentInternal(System.Windows.Forms.Cursor)) 00000000008fa070 00007ff8d27e6b23 (MethodDesc 00007ff8d28920f0 +0x33 Microsoft.Data.ConnectionUI.DataConnectionDialog.TestConnection(System.Object, System.EventArgs)), calling 00007ff8d28a6eb0 00000000008fa080 00007ff92b93f728 (MethodDesc 00007ff92b6f1040 +0x58 System.ComponentModel.EventHandlerList.get_Item(System.Object)), calling 00007ff8d26beba0 00000000008fa0c0 00007ff8eb474747 (MethodDesc 00007ff8eb25db60 +0x87 System.Windows.Forms.Control.OnClick(System.EventArgs)) 0:000> !dumpil 00007ff8d2891ff8 ilAddr = 000000001edd4cc0 IL_0000: ldarg.0 IL_0001: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataProvider IL_0006: brtrue.s IL_000a IL_0008: ldnull IL_0009: ret IL_000a: ldarg.0 IL_000b: ldfld Microsoft.Data.ConnectionUI.DataConnectionDialog::_connectionPropertiesTable IL_0010: ldarg.0 IL_0011: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_0016: callvirt class [mscorlib]System.Collections.Generic.IDictio::ContainsKey IL_001b: brtrue.s IL_0033 IL_001d: ldarg.0 IL_001e: ldfld Microsoft.Data.ConnectionUI.DataConnectionDialog::_connectionPropertiesTable IL_0023: ldarg.0 IL_0024: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_0029: newobj class [mscorlib]System.Collections.Generic.Diction::.ctor IL_002e: callvirt class [mscorlib]System.Collections.Generic.IDictio::set_Item IL_0033: ldarg.0 IL_0034: ldfld Microsoft.Data.ConnectionUI.DataConnectionDialog::_connectionPropertiesTable IL_0039: ldarg.0 IL_003a: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_003f: callvirt class [mscorlib]System.Collections.Generic.IDictio::get_Item IL_0044: ldarg.0 IL_0045: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataProvider IL_004a: callvirt class [mscorlib]System.Collections.Generic.IDictio::ContainsKey IL_004f: brtrue.s IL_00c3 IL_0051: ldnull IL_0052: stloc.0 .try { IL_0053: ldarg.0 IL_0054: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_0059: ldarg.0 IL_005a: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_UnspecifiedDataSource IL_005f: bne.un.s IL_006f IL_0061: ldarg.0 IL_0062: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataProvider IL_0067: callvirt Microsoft.Data.ConnectionUI.DataProvider::CreateConnectionProperties IL_006c: stloc.0 IL_006d: br.s IL_0081 IL_006f: ldarg.0 IL_0070: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataProvider IL_0075: ldarg.0 IL_0076: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_007b: callvirt Microsoft.Data.ConnectionUI.DataProvider::CreateConnectionProperties IL_0080: stloc.0 IL_0081: leave.s IL_0086 } // end .try .catch { IL_0083: pop IL_0084: leave.s IL_0086 } // end .catch IL_0086: ldloc.0 IL_0087: brtrue.s IL_008f IL_0089: newobj BasicConnectionProperties::.ctor IL_008e: stloc.0 .try { IL_008f: ldloc.0 IL_0090: ldarg.0 IL_0091: ldftn Microsoft.Data.ConnectionUI.DataConnectionDialog::ConfigureAcceptButton IL_0097: newobj System.EventHandler::.ctor IL_009c: callvirt Microsoft.Data.ConnectionUI.IDataConnectionProper::add_PropertyChanged IL_00a1: leave.s IL_00a6 } // end .try .catch { IL_00a3: pop IL_00a4: leave.s IL_00a6 } // end .catch IL_00a6: ldarg.0 IL_00a7: ldfld Microsoft.Data.ConnectionUI.DataConnectionDialog::_connectionPropertiesTable IL_00ac: ldarg.0 IL_00ad: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_00b2: callvirt class [mscorlib]System.Collections.Generic.IDictio::get_Item IL_00b7: ldarg.0 IL_00b8: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataProvider IL_00bd: ldloc.0 IL_00be: callvirt class [mscorlib]System.Collections.Generic.IDictio::set_Item IL_00c3: ldarg.0 IL_00c4: ldfld Microsoft.Data.ConnectionUI.DataConnectionDialog::_connectionPropertiesTable IL_00c9: ldarg.0 IL_00ca: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataSource IL_00cf: callvirt class [mscorlib]System.Collections.Generic.IDictio::get_Item IL_00d4: ldarg.0 IL_00d5: call Microsoft.Data.ConnectionUI.DataConnectionDialog::get_SelectedDataProvider IL_00da: callvirt class [mscorlib]System.Collections.Generic.IDictio::get_Item IL_00df: ret System_Data_ni!?System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute@@200101128638+0x54 (00007ff9`06811e98)] ds:00007ff9`06811e98=00007ff906c6a530 0:008> !name2ee System_Data_ni System.Data.SqlClient.SqlConnectionStringBuilder..ctor Module: 00007ff90e741000 Assembly: System.Data.dll Token: 0000000006001b2f MethodDesc: 00007ff90e811618 Name: System.Data.SqlClient.SqlConnectionStringBuilder..ctor() JITTED Code Address: 00007ff90ec68090 ----------------------- Token: 0000000006001b30 MethodDesc: 00007ff90e8119d0 Name: System.Data.SqlClient.SqlConnectionStringBuilder..ctor(System.String) JITTED Code Address: 00007ff90ec680c0 0:008> !name2ee System_Data_ni System.Data.SqlClient.SqlConnectionStringBuilder.GetAt Module: 00007ff90e741000 Assembly: System.Data.dll Token: 0000000006001b8d MethodDesc: 00007ff90e811960 Name: System.Data.SqlClient.SqlConnectionStringBuilder.GetAt(Keywords) JITTED Code Address: 00007ff90ec6a1b0 0:008> bp 00007ff90ec6a1b0 0:000> !clrstack -a OS Thread Id: 0x1398 (0) Child SP IP Call Site 00000000006fa018 00007ff90ec6a1b0 System.Data.SqlClient.SqlConnectionStringBuilder.GetAt(Keywords) PARAMETERS: this (<CLR reg>) = 0x000000000278d400 0:000> !DumpObj /d 000000000278d400 Name: System.Data.SqlClient.SqlConnectionStringBuilder MethodTable: 00007ff90e7526e8 EEClass: 00007ff90e7e36a8 Size: 208(0xd0) bytes File: C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll Fields: MT Field Offset Type VT Attr Value Name 00007ff92dc159c0 4000fcf 40 System.String 0 instance 000000000288c2f0 _dataSource 0:000> ba r4 000000000288c2f0 0:000> !dumpstack OS Thread Id: 0x1398 (0) Current frame: (MethodDesc 00007ff8d285ce68 +0x3a Microsoft.Data.ConnectionUI.SqlConnectionProperties.Test()) Child-SP RetAddr Caller, Callee 00000000006fa030 00007ff92e18e221 (MethodDesc 00007ff92ddbfb50 +0x11 System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].get_Item(System.__Canon)), calling (MethodDesc 00007ff92ddbfbb0 +0 System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].FindEntry(System.__Canon)) 0:000> !dso OS Thread Id: 0x1398 (0) RSP/REG Object Name rax 000000000288c2f0 System.String localhost rbx 000000000277ec98 System.EventHandler rsi 0000000002783c70 Microsoft.Data.ConnectionUI.SqlConnectionProperties rdi 0000000002742e08 System.EventArgs r8 000000000278db60 System.String Data Source 00000000006FA048 000000000277ec98 System.EventHandler Microsoft_Data_ConnectionUI_Dialog!Microsoft.Data.ConnectionUI.SqlConnectionProperties.Test + 0x3a 0:018> !dumpheap -type System.Data.SqlClient.SqlConnectionStringBuilder Address MT Size 000000000237d430 00007ff90e7526e8 208 000000000237e340 00007ff90e7a2920 80 000000000237e498 00007ff90ef6b680 1440 Statistics: MT Count TotalSize Class Name 00007ff90e7a2920 1 80 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Data.SqlClient.SqlConnectionStringBuilder+Keywords, System.Data]] 00007ff90e7526e8 1 208 System.Data.SqlClient.SqlConnectionStringBuilder 00007ff90ef6b680 1 1440 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Data.SqlClient.SqlConnectionStringBuilder+Keywords, System.Data]][] Total 3 objects Fragmented blocks larger than 0.5 MB: Addr Size Followed by 00000000025e7138 1.5MB 0000000002770c48 System.String 0:018> !DumpObj /d 000000000237d430 Name: System.Data.SqlClient.SqlConnectionStringBuilder 0:000> !dumpstack OS Thread Id: 0x1398 (0) Current frame: (MethodDesc 00007ff90e811960 +0 System.Data.SqlClient.SqlConnectionStringBuilder.GetAt(Keywords)) Child-SP RetAddr Caller, Callee 00000000006fa010 00007ff8d27a6c18 (MethodDesc 00007ff8d285ce68 +0x28 Microsoft.Data.ConnectionUI.SqlConnectionProperties.Test()) 0:000> !DumpObj /d 00000000029d8eb0 Name: System.Data.SqlClient.SqlConnectionStringBuilder MethodTable: 00007ff9067526e8 EEClass: 00007ff9067e36a8 Size: 208(0xd0) bytes File: C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll Fields: MT Field Offset Type VT Attr Value Name 00007ff92dc159c0 4000fcc 28 System.String 0 instance 00000000029da4a0 _applicationName 00007ff92dc159c0 4000fcd 30 System.String 0 instance 0000000002961420 _attachDBFilename 00007ff92dc159c0 4000fce 38 System.String 0 instance 0000000002961420 _currentLanguage 00007ff92dc159c0 4000fcf 40 System.String 0 instance 00000000029ff368 _dataSource localhost 00007ff92dc159c0 4000fd3 60 System.String 0 instance 0000000002a010b0 _password 1 00007ff92dc159c0 4000fd4 68 System.String 0 instance 00000000029da520 _initialCatalog dycw 00007ff92dc159c0 4000fd5 70 System.String 0 instance 00000000029da4f8 _typeSystemVersion 00007ff92dc159c0 4000fd6 78 System.String 0 instance 0000000002a01048 _userID sa 0:000> !U /d 00007ff8d27e6c18 Normal JIT generated code Microsoft.Data.ConnectionUI.SqlConnectionProperties.Test() Begin 00007ff8d27e6bf0, size 147 00007ff8`d27e6bf0 55 push rbp 00007ff8`d27e6bf1 56 push rsi 00007ff8`d27e6bf2 4883ec38 sub rsp,38h 00007ff8`d27e6bf6 488d6c2440 lea rbp,[rsp+40h] 00007ff8`d27e6bfb 488965e0 mov qword ptr [rbp-20h],rsp 00007ff8`d27e6bff 488bf1 mov rsi,rcx 00007ff8`d27e6c02 488b4e18 mov rcx,qword ptr [rsi+18h] 00007ff8`d27e6c06 488b1425b0269712 mov rdx,qword ptr [129726B0h] ("Data Source") 00007ff8`d27e6c0e 488b01 mov rax,qword ptr [rcx] 00007ff8`d27e6c11 488b4040 mov rax,qword ptr [rax+40h] 00007ff8`d27e6c15 ff5030 call qword ptr [rax+30h] >>> 00007ff8`d27e6c18 4885c0 test rax,rax 00007ff8`d27e6c1b 7411 je 00007ff8`d27e6c2e 00007ff8`d27e6c1d 48b9c059c12df97f0000 mov rcx,offset mscorlib_ni!GetEnvironmentVariable+0x34 (00007ff9`2dc159c0) (MT: System.String) 00007ff8`d27e6c27 483908 cmp qword ptr [rax],rcx 00007ff8`d27e6c2a 7402 je 00007ff8`d27e6c2e 00007ff8`d27e6c2c 33c0 xor eax,eax 00007ff8`d27e6c2e 4885c0 test rax,rax 00007ff8`d27e6c31 7446 je 00007ff8`d27e6c79 00007ff8`d27e6c33 83780800 cmp dword ptr [rax+8],0 00007ff8`d27e6c37 7440 je 00007ff8`d27e6c79 00007ff8`d27e6c39 488b4e18 mov rcx,qword ptr [rsi+18h] 00007ff8`d27e6c3d 488b1425c0269712 mov rdx,qword ptr [129726C0h] ("Initial Catalog") 00007ff8`d27e6c45 488b01 mov rax,qword ptr [rcx] 00007ff8`d27e6c48 488b4040 mov rax,qword ptr [rax+40h] 00007ff8`d27e6c4c ff5030 call qword ptr [rax+30h] 00007ff8`d27e6c4f 4885c0 test rax,rax 00007ff8`d27e6c52 7411 je 00007ff8`d27e6c65 00007ff8`d27e6c54 48b9c059c12df97f0000 mov rcx,offset mscorlib_ni!GetEnvironmentVariable+0x34 (00007ff9`2dc159c0) (MT: System.String) 00007ff8`d27e6c5e 483908 cmp qword ptr [rax],rcx 00007ff8`d27e6c61 7402 je 00007ff8`d27e6c65 00007ff8`d27e6c63 33c0 xor eax,eax 00007ff8`d27e6c65 488945f0 mov qword ptr [rbp-10h],rax 00007ff8`d27e6c69 488bce mov rcx,rsi 00007ff8`d27e6c6c e81747ffff call 00007ff8`d27db388 (Microsoft.Data.ConnectionUI.AdoDotNetConnectionProperties.Test(), mdToken: 0000000006000029) 00007ff8`d27e6c71 90 nop 00007ff8`d27e6c72 488d65f8 lea rsp,[rbp-8] 00007ff8`d27e6c76 5e pop rsi 00007ff8`d27e6c77 5d pop rbp 00007ff8`d27e6c78 c3 ret 00007ff8`d27e6c79 48b9d844c92df97f0000 mov rcx,offset mscorlib_ni!.ctor+0xb (00007ff9`2dc944d8) (MT: System.InvalidOperationException) 00007ff8`d27e6c83 e8d8b84f5f call clr!JIT_TrialAllocSFastMP_InlineGetThread (00007ff9`31ce2560) 00007ff8`d27e6c88 488bf0 mov rsi,rax 00007ff8`d27e6c8b b917240000 mov ecx,2417h 00007ff8`d27e6c90 48bad01289d2f87f0000 mov rdx,7FF8D28912D0h 00007ff8`d27e6c9a e8a1b06c5f call clr!JIT_StrCns (00007ff9`31eb1d40) 00007ff8`d27e6c9f 488bc8 mov rcx,rax 00007ff8`d27e6ca2 e8f937ffff call 00007ff8`d27da4a0 (Microsoft.Data.ConnectionUI.SR.GetString(System.String), mdToken: 0000000006000262) 00007ff8`d27e6ca7 488bd0 mov rdx,rax 00007ff8`d27e6caa 488bce mov rcx,rsi 00007ff8`d27e6cad e88e69245c call mscorlib_ni!System.InvalidOperationException..ctor (00007ff9`2ea2d640) 00007ff8`d27e6cb2 488bce mov rcx,rsi 00007ff8`d27e6cb5 e84673675f call clr!IL_Throw (00007ff9`31e5e000) 00007ff8`d27e6cba cc int 3 00007ff8`d27e6cbb 55 push rbp 00007ff8`d27e6cbc 56 push rsi 00007ff8`d27e6cbd 4883ec28 sub rsp,28h 00007ff8`d27e6cc1 488b6920 mov rbp,qword ptr [rcx+20h] 00007ff8`d27e6cc5 48896c2420 mov qword ptr [rsp+20h],rbp 00007ff8`d27e6cca 488d6d40 lea rbp,[rbp+40h] 00007ff8`d27e6cce 488bca mov rcx,rdx 00007ff8`d27e6cd1 3909 cmp dword ptr [rcx],ecx 00007ff8`d27e6cd3 e898361034 call System_Data_ni+0x1aa370 (00007ff9`068ea370) (System.Data.SqlClient.SqlException.get_Number(), mdToken: 0000000006001d37) 00007ff8`d27e6cd8 3ddc0f0000 cmp eax,0FDCh 00007ff8`d27e6cdd 7552 jne 00007ff8`d27e6d31 00007ff8`d27e6cdf 48837df000 cmp qword ptr [rbp-10h],0 00007ff8`d27e6ce4 744b je 00007ff8`d27e6d31 00007ff8`d27e6ce6 488b4df0 mov rcx,qword ptr [rbp-10h] 00007ff8`d27e6cea 83790800 cmp dword ptr [rcx+8],0 00007ff8`d27e6cee 7e41 jle 00007ff8`d27e6d31 00007ff8`d27e6cf0 48b9d844c92df97f0000 mov rcx,offset mscorlib_ni!.ctor+0xb (00007ff9`2dc944d8) (MT: System.InvalidOperationException) 00007ff8`d27e6cfa e861b84f5f call clr!JIT_TrialAllocSFastMP_InlineGetThread (00007ff9`31ce2560) 00007ff8`d27e6cff 488bf0 mov rsi,rax 00007ff8`d27e6d02 b973240000 mov ecx,2473h 00007ff8`d27e6d07 48bad01289d2f87f0000 mov rdx,7FF8D28912D0h 00007ff8`d27e6d11 e82ab06c5f call clr!JIT_StrCns (00007ff9`31eb1d40) 00007ff8`d27e6d16 488bc8 mov rcx,rax 00007ff8`d27e6d19 e88237ffff call 00007ff8`d27da4a0 (Microsoft.Data.ConnectionUI.SR.GetString(System.String), mdToken: 0000000006000262) 00007ff8`d27e6d1e 488bd0 mov rdx,rax 00007ff8`d27e6d21 488bce mov rcx,rsi 00007ff8`d27e6d24 e81769245c call mscorlib_ni!System.InvalidOperationException..ctor (00007ff9`2ea2d640) 00007ff8`d27e6d29 488bce mov rcx,rsi 00007ff8`d27e6d2c e8cf72675f call clr!IL_Throw (00007ff9`31e5e000) 00007ff8`d27e6d31 e8ca886d5f call clr!IL_Rethrow (00007ff9`31ebf600) 00007ff8`d27e6d36 cc int 3 0:000> !dumpil 00007ff8d289ce68 ilAddr = 000000001eddda70 IL_0000: ldarg.0 IL_0001: call Microsoft.Data.ConnectionUI.AdoDotNetConnectionP::get_ConnectionStringBuilder IL_0006: ldstr "Data Source" IL_000b: callvirt System.Data.Common.DbConnectionStringBuilder::get_Item IL_0010: isinst System.String IL_0015: stloc.0 IL_0016: ldloc.0 IL_0017: brfalse.s IL_0021 IL_0019: ldloc.0 IL_001a: callvirt System.String::get_Length IL_001f: brtrue.s IL_0031 IL_0021: ldstr "SqlConnectionProperties_MustSpecifyDataSource" IL_0026: call Microsoft.Data.ConnectionUI.SR::GetString IL_002b: newobj System.InvalidOperationException::.ctor IL_0030: throw IL_0031: ldarg.0 IL_0032: call Microsoft.Data.ConnectionUI.AdoDotNetConnectionP::get_ConnectionStringBuilder IL_0037: ldstr "Initial Catalog" IL_003c: callvirt System.Data.Common.DbConnectionStringBuilder::get_Item IL_0041: isinst System.String IL_0046: stloc.1 .try { IL_0047: ldarg.0 IL_0048: call Microsoft.Data.ConnectionUI.AdoDotNetConnectionP::Test IL_004d: leave.s IL_007b } // end .try .catch { IL_004f: stloc.2 IL_0050: ldloc.2 IL_0051: callvirt System.Data.SqlClient.SqlException::get_Number IL_0056: ldc.i4 4060 IL_005b: bne.un.s IL_0079 IL_005d: ldloc.1 IL_005e: brfalse.s IL_0079 IL_0060: ldloc.1 IL_0061: callvirt System.String::get_Length IL_0066: ldc.i4.0 IL_0067: ble.s IL_0079 IL_0069: ldstr "SqlConnectionProperties_CannotTestNonExistentDatabase" IL_006e: call Microsoft.Data.ConnectionUI.SR::GetString IL_0073: newobj System.InvalidOperationException::.ctor IL_0078: throw IL_0079: rethrow } // end .catch IL_007b: ret 0:018> !DumpRuntimeTypes Address Domain MT Type Name ------------------------------------------------------------------------------ 00000000022f2088 00000000004e87f0 00007ff92dc17000 System.Type 00000000022f20c0 00000000004e87f0 00007ff92dc17d20 System.Byte 00000000022f20f8 00000000004e87f0 00007ff92dc14318 System.IEquatable`1[[System.Type, mscorlib]] 00000000022f2130 00000000004e87f0 00007ff92dc17f38 System.Reflection.MemberInfo 00000000022f2168 00000000004e87f0 00007ff92dc18008 System.ValueType 00000000022f21a0 00000000004e87f0 00007ff92dc18050 System.Enum 0:018> !DumpDomain -------------------------------------- System Domain: 00007ff9326fe6e0 LowFrequencyHeap: 00007ff9326fec58 HighFrequencyHeap: 00007ff9326fece8 StubHeap: 00007ff9326fed78 Stage: OPEN Name: None -------------------------------------- Assembly: 0000000000565f20 [C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\ElitechColdCloud.exe] ClassLoader: 0000000000566040 SecurityDescriptor: 0000000000565e30 Module Name 00007ff8d2694148 C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\ElitechColdCloud.exe Assembly: 0000000000591990 [C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\log4net.dll] ClassLoader: 0000000000588450 SecurityDescriptor: 0000000000590fb0 Module Name 00007ff8d2695c20 C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\log4net.dll Assembly: 000000001ac78080 [C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\Util.dll] ClassLoader: 000000001ac33970 SecurityDescriptor: 000000001ac10aa0 Module Name 00007ff8d28708b0 C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\Util.dll Assembly: 000000001ac781a0 [C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\Microsoft.Data.ConnectionUI.Dialog.dll] ClassLoader: 000000001ac326e0 SecurityDescriptor: 000000001ac12120 Module Name 00007ff8d28712d0 C:\Users\bosd\documents\visual studio 2015\Projects\ElitechColdCloud\WindowsFormsApplication1\bin\Debug\Microsoft.Data.ConnectionUI.Dialog.dll
0:000> !clrstack OS Thread Id: 0x25e0 (0) Child SP IP Call Site 004fe2d0 76e62bec [InlinedCallFrame: 004fe2d0] System.Windows.Forms.UnsafeNativeMethods.WaitMessage() 004fe2cc 05bf4b48 System.Windows.Forms.Application+ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form) 004fe338 0553315d System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 004fe388 05532f23 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 004fe3b4 05bf3a53 System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form) 004fe3c8 05c1bdbd System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window) 004fe3cc 2f25919a [InlinedCallFrame: 004fe3cc] 004fe470 2f25919a *** WARNING: Unable to verify checksum for C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.Vdf92321b#\e5b7b8ec0c29d27cacb5d2aebecf71ca\Microsoft.VisualStudio.ni.dll Microsoft.VisualStudio.UIService.System.Windows.Forms.Design.IUIService.ShowDialog(System.Windows.Forms.Form) 004fe4a4 2f258df9 Microsoft.VisualStudio.Data.HostServices.Environment.ShowDialog(System.Windows.Forms.Form) 004fe4d4 2f258b8d Microsoft.VisualStudio.Data.Framework.DataConnectionPromptDialog.ShowDialog(Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataConnectionSupport) 004fe504 2f258865 Microsoft.VisualStudio.Data.Providers.SqlServer.SqlConnectionPromptDialog.ShowDialog(Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataConnectionSupport) 004fe548 2f253c93 Microsoft.VisualStudio.Data.Package.DataConnection.OpenInternal() 004fe584 2f2539fb Microsoft.VisualStudio.Data.Package.DataConnection.Open() 004fe5e0 2f25396a Microsoft.VisualStudio.Data.Package.DataConnection.EnsureConnected() 004fe5ec 2f2537aa Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetSourceInformation.get_SourceInformation() 004fe610 2f2536d7 Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetSourceInformation.GetAdoProperty(System.String) 004fe62c 2f253255 Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetSourceInformation.RetrieveValue(System.String) 004fe664 2f25318a Microsoft.VisualStudio.Data.Providers.SqlServer.SqlSourceInformation.RetrieveValue(System.String) 004fe684 2f252a5d Microsoft.VisualStudio.Data.Framework.DataSourceInformation.get_Item(System.String) 004fe6b4 2f252947 Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetSourceInformation.Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataSourceInformation.get_Item(System.String) 004fe6d0 2f252671 Microsoft.VisualStudio.Data.Package.Client.DataSourceInformation.get_Item(System.String) 004fe6fc 2f251596 Microsoft.VisualStudio.Data.Framework.DataSourceVersionComparer.get_SourceVersion() 004fe70c 2f25151a Microsoft.VisualStudio.Data.Framework.DataSourceVersionComparer.CompareTo(System.String) 004fe720 2f2514b7 Microsoft.VisualStudio.Data.Package.Client.DataSourceVersionComparer.CompareTo(System.String) 004fe74c 2ef7bac1 Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].get_ElementApplies() 004fe764 2ef7d4da Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildCollection[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]], mscorlib]](ItemBuilder`1<System.__Canon,System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>>) 004fe798 2ef7d47c Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildList[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]], mscorlib]](ItemBuilder`1<System.__Canon,System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>>) 004fe7b8 2ef7d3cf Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildDictionary[[System.__Canon, mscorlib],[System.__Canon, mscorlib]](System.Collections.Generic.IEqualityComparer`1<System.__Canon>, KeyValueBuilder`2<System.__Canon,System.__Canon,System.__Canon>) 004fe7dc 2f250db5 Microsoft.VisualStudio.Data.Package.DataObjectSupportBuilder.BuildType(System.Collections.Generic.IDictionary`2<System.String,Microsoft.VisualStudio.Data.Services.IVsDataObjectType>) 004fe830 2ef7da57 Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1+c__DisplayClass21_0`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]].b__0(System.Collections.Generic.IList`1<System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>>) 004fe860 2ef7d526 Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildCollection[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]], mscorlib]](ItemBuilder`1<System.__Canon,System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>>) 004fe894 2ef7d47c Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildList[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]], mscorlib]](ItemBuilder`1<System.__Canon,System.Collections.Generic.KeyValuePair`2<System.__Canon,System.__Canon>>) 004fe8b4 2ef7d3cf Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildDictionary[[System.__Canon, mscorlib],[System.__Canon, mscorlib]](System.Collections.Generic.IEqualityComparer`1<System.__Canon>, KeyValueBuilder`2<System.__Canon,System.__Canon,System.__Canon>) 004fe8d8 2f250a7f Microsoft.VisualStudio.Data.Package.DataObjectSupportBuilder.BuildFromRoot() 004fe914 2ef77aee Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].Build() 004fe9a0 2ef7f0a6 Microsoft.VisualStudio.Data.Package.DataConnection.CreateService(System.ComponentModel.Design.IServiceContainer, System.Type) 004feadc 2e26485a Microsoft.VisualStudio.Data.Framework.ServiceProvider.GetService(System.Type) 004feb24 2ef7556a Microsoft.VisualStudio.Data.Package.DataConnection.GetService(System.Type) 004feb50 2ef7e854 Microsoft.VisualStudio.Data.Package.DataViewSupportBuilder.get_ObjectSupportModel() 004feb60 2ef7e349 Microsoft.VisualStudio.Data.Package.DataViewSupportBuilder.BuildNode(Boolean, Microsoft.VisualStudio.Data.Services.IVsDataObjectType) 004febdc 2ef7c050 Microsoft.VisualStudio.Data.Package.DataViewSupportBuilder.BuildView(System.Collections.Generic.IList`1<Microsoft.VisualStudio.Data.Services.IVsDataViewInfo>) 004fec4c 2ef7aa2a Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].BuildCollection[[System.__Canon, mscorlib]](ItemBuilder`1<System.__Canon,System.__Canon>) 004fec6c 2ef78699 Microsoft.VisualStudio.Data.Package.DataViewSupportBuilder.BuildFromRoot() 004feca0 2ef77aee Microsoft.VisualStudio.Data.Package.DataSupportBuilder`1[[System.__Canon, mscorlib]].Build() 004fed2c 2ef72c87 Microsoft.VisualStudio.Data.Package.DataExplorerConnection.InitializeModel() 004fed64 2ef729e7 Microsoft.VisualStudio.Data.Package.DataExplorerConnection.get_CurrentViewIndex() 004fed98 2ef72875 Microsoft.VisualStudio.Data.Package.DataExplorerConnection+Hierarchy.get_CurrentView() 004fedac 2ef7283b Microsoft.VisualStudio.Data.Package.DataExplorerConnectionNode.RetrieveViewCommonNodeInfo() 004fedb8 2ef7277b Microsoft.VisualStudio.Data.Package.DataExplorerNode.get_ViewCommonNodeInfo() 004fede8 2ef72659 Microsoft.VisualStudio.Data.Package.DataExplorerNode.get_IsVisible() 004fee1c 2ef70ac8 Microsoft.VisualStudio.Data.Package.DataExplorerNode.TryGetProperty(Int32, System.Object ByRef) 004fee5c 2ef70135 Microsoft.VisualStudio.Data.Package.DataExplorerConnectionNode.TryGetProperty(Int32, System.Object ByRef) 004fee74 2eb4ff4e Microsoft.VisualStudio.Data.Package.DataExplorerNode.Microsoft.VisualStudio.Data.Package.IVsDataInternalExplorerNode.TryGetProperty(Int32, System.Object ByRef) 004fee80 2eb4fefc Microsoft.VisualStudio.Data.Package.DataExplorerConnection.TryGetProperty(Int32, Int32, System.Object ByRef) 004fef00 2eb4f901 Microsoft.VisualStudio.Data.Package.DataExplorerConnection.Microsoft.VisualStudio.Shell.Interop.IVsHierarchy.GetProperty(UInt32, Int32, System.Object ByRef) 004fef34 2916f0be DomainNeutralILStubClass.IL_STUB_COMtoCLR(Int32, Int32, IntPtr) 004ff008 515ff434 [ComMethodFrame: 004ff008] 004ff274 515ff434 [InlinedCallFrame: 004ff274] 004ff270 2eb4f811 DomainNeutralILStubClass.IL_STUB_CLRtoCOM(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy, UInt32) 004ff274 2eb4f747 [InlinedCallFrame: 004ff274] Microsoft.VisualStudio.Shell.Interop.IVsSolution.AddVirtualProject(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy, UInt32) 004ff2dc 2eb4f747 Microsoft.VisualStudio.Data.Package.DataExplorerConnection.Microsoft.VisualStudio.Shell.Interop.IVsSolutionEvents.OnAfterOpenSolution(System.Object, Int32) 004ff2f0 2eb4edb2 Microsoft.VisualStudio.Data.Package.DataExplorerConnection.SetProperty(Int32, Int32, System.Object) 004ff348 2eb4ec0b Microsoft.VisualStudio.Data.Package.DataExplorerConnection.Microsoft.VisualStudio.Shell.Interop.IVsHierarchy.SetProperty(UInt32, Int32, System.Object) 004ff370 2eb4e658 Microsoft.VSDesigner.ServerExplorer.DataViewNode.CreateNestedHierarchy() 004ff3a8 2eb4e334 Microsoft.VSDesigner.ServerExplorer.DataViewNode.EnsureNestedHierarchyAttached() 004ff3b4 2eb4dd50 Microsoft.VSDesigner.ServerExplorer.DataConnectionsNode.AddConnection(System.String, System.Guid, System.String, Boolean, Boolean) 004ff428 2eb4da05 Microsoft.VSDesigner.ServerExplorer.DataConnectionsNode.AddConnection(System.String, System.Guid, System.String, Boolean) 004ff448 2480c160 Microsoft.VisualStudio.Web.Util.ServerExplorerConnectionsUtility.AddWebConfigConnectionsToDCNode(Microsoft.VisualStudio.OLE.Interop.IServiceProvider, System.String) 004ff4d8 34d73579 Microsoft.VisualStudio.Web.Application.WAProject.AddWebConfigConnectionsToDCNode(System.Object, System.EventArgs) 004ff4f8 02f2d28b [MulticastFrame: 004ff4f8] System.EventHandler.Invoke(System.Object, System.EventArgs) 004ff524 055366c5 System.Windows.Forms.Application+ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32) 004ff534 05c88dcc System.Windows.Forms.ComponentManagerProxy.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32) 004ff580 05bbad12 DomainNeutralILStubClass.IL_STUB_COMtoCLR(Int32) 004ff61c 515ff3f1 [ComMethodFrame: 004ff61c]
0:000> !dso OS Thread Id: 0x25e0 (0) ESP/REG Object Name 004FE2E8 1cc3d854 Microsoft.VisualStudio.Data.Providers.SqlServer.SqlConnectionPromptDialog 004FF434 1cb5b428 System.String Data Source=.;Initial Catalog=YXUDI_update;Persist Security Info=True;User ID=UDIUDP;Password=BOSD*3574#soft*2486% 004FF44C 1cb5b428 System.String Data Source=.;Initial Catalog=YXUDI_update;Persist Security Info=True;User ID=UDIUDP;Password=BOSD*3574#soft*2486% 004FF454 1cac2a94 Microsoft.VSDesigner.ServerExplorer.DataConnectionsNode 004FF458 1ca29f20 Microsoft.VisualStudio.Shell.ServiceProvider 004FF45C 1ca29de4 System.String JMIdentityDataBaseWebService 004FF460 1cb593ac System.Collections.Generic.List`1[[System.Configuration.ConnectionStringSettings, System.Configuration]] 004FF498 1cb5a2e8 System.Configuration.ConnectionStringSettings 004FF4C4 213e2d0c System.__ComObject 004FF4C8 2133d0b4 Microsoft.VisualStudio.Web.Application.WAProject 004FF4CC 213e2d0c System.__ComObject 004FF4D8 1ca29cf4 System.String F:\Yangl\VS2015 Projects\BarCodeParseIdentityLib\JMIdentityDataBaseWebService\JMIdentityDataBaseWebService.csproj
0:011> !clrstack OS Thread Id: 0x504 (11) Child SP IP Call Site 00000000204be898 00007ffbe3601224 [InlinedCallFrame: 00000000204be898] System.Windows.Forms.UnsafeNativeMethods.WaitMessage() 00000000204be898 00007ffb81ec57e9 [InlinedCallFrame: 00000000204be898] System.Windows.Forms.UnsafeNativeMethods.WaitMessage() 00000000204be870 00007ffb81ec57e9 DomainBoundILStubClass.IL_STUB_PInvoke() 00000000204be920 00007ffb81e56895 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) 00000000204bea10 00007ffb81e55fc7 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 00000000204beab0 00007ffb81e55dc2 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 00000000204beb10 00007ffb826159c8 System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window) 00000000204bec10 00007ffb714d6a3b Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(Microsoft.Data.ConnectionUI.DataConnectionDialog, System.Windows.Forms.IWin32Window) 00000000204bee10 00007ffb714d6477 Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(Microsoft.Data.ConnectionUI.DataConnectionDialog) 00000000204bee50 00007ffb714d0237 IoriUtilityLib.Iori.InstallerUtil.setDBConnDialog(System.String) 00000000204bef30 00007ffb714cf73b IoriUtilityLib.Iori.InstallerUtil.checkDatabase(System.String ByRef, System.Action`1<System.String>) 00000000204befd0 00007ffb714cf678 IoriUtilityLib.Iori.InstallerUtil.checkDatabase(System.Action`1<System.String>) 00000000204bf010 00007ffb714cf4d9 BarCodeAnalysisTools.WinUI.Form1+c.<btnGetIncrementID_Click>b__5_0(CObjectParams) [F:\Yangl\VS2015 Projects\BarCodeParseIdentityLib\BarCodeAnalysisTools.WinUI\Form1.cs @ 96] 00000000204bf0d0 00007ffb714ce949 IoriUtilityLib.Iori.TimeUtil+c__DisplayClass10_0.b__0(System.Object) 00000000204bf170 00007ffbcd94df12 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 00000000204bf240 00007ffbcd94dd95 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 00000000204bf270 00007ffbcd919c06 System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 00000000204bf2b0 00007ffbcd918e46 System.Threading.ThreadPoolWorkQueue.Dispatch() 00000000204bf750 00007ffbd0a16953 [DebuggerU2MCatchHandlerFrame: 00000000204bf750]
0:000> !clrstack OS Thread Id: 0x225c (0) Child SP IP Call Site 00000000008fdd68 00007ffbe3601224 [InlinedCallFrame: 00000000008fdd68] System.Windows.Forms.UnsafeNativeMethods.WaitMessage() 00000000008fdd68 00007ffb81ec57e9 [InlinedCallFrame: 00000000008fdd68] System.Windows.Forms.UnsafeNativeMethods.WaitMessage() 00000000008fdd40 00007ffb81ec57e9 DomainBoundILStubClass.IL_STUB_PInvoke() 00000000008fddf0 00007ffb81e56895 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) 00000000008fdee0 00007ffb81e55fc7 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 00000000008fdf80 00007ffb81e55dc2 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 00000000008fdfe0 00007ffb826159c8 System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window) 00000000008fe0e0 00007ffb714c572b Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(Microsoft.Data.ConnectionUI.DataConnectionDialog, System.Windows.Forms.IWin32Window) 00000000008fe2e0 00007ffb714c5167 Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(Microsoft.Data.ConnectionUI.DataConnectionDialog) 00000000008fe320 00007ffb714bf037 IoriUtilityLib.Iori.InstallerUtil.setDBConnDialog(System.String) 00000000008fe400 00007ffb714be77b IoriUtilityLib.Iori.InstallerUtil.checkDatabase(System.String ByRef, System.Action`1<System.String>) 00000000008fe4a0 00007ffb714be6b8 IoriUtilityLib.Iori.InstallerUtil.checkDatabase(System.Action`1<System.String>) 00000000008fe4e0 00007ffb714be50b BarCodeAnalysisTools.WinUI.Form1.btnGetIncrementID_Click(System.Object, System.EventArgs) [F:\Yangl\VS2015 Projects\BarCodeParseIdentityLib\BarCodeAnalysisTools.WinUI\Form1.cs @ 91] 00000000008fe590 00007ffb81e34747 System.Windows.Forms.Control.OnClick(System.EventArgs) 00000000008fe5d0 00007ffb81e37b83 System.Windows.Forms.Button.OnClick(System.EventArgs) 00000000008fe620 00007ffb82647a31 System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs) 00000000008fe6e0 00007ffb825f117d System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32) 00000000008fe760 00007ffb81e411cc System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef) 00000000008fe820 00007ffb81ec0c97 System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef) 00000000008fe8a0 00007ffb81ec0be5 System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef) 00000000008fe8d0 00007ffb82602a46 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr) 00000000008fe950 00007ffb82575b12 DomainBoundILStubClass.IL_STUB_ReversePInvoke(Int64, Int32, Int64, Int64) 00000000008fec80 00007ffbd0a1224e [InlinedCallFrame: 00000000008fec80] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef) 00000000008fec80 00007ffb81ec9489 [InlinedCallFrame: 00000000008fec80] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef) 00000000008fec50 00007ffb81ec9489 DomainBoundILStubClass.IL_STUB_PInvoke(MSG ByRef) 00000000008fed10 00007ffb81e56661 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) 00000000008fee00 00007ffb81e55fc7 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 00000000008feea0 00007ffb81e55dc2 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 00000000008fef00 00007ffb714b08e6 BarCodeAnalysisTools.WinUI.Program.Main() [F:\Yangl\VS2015 Projects\BarCodeParseIdentityLib\BarCodeAnalysisTools.WinUI\Program.cs @ 18] 00000000008ff138 00007ffbd0a16953 [GCFrame: 00000000008ff138]
Microsoft.Data.ConnectionUI.DataConnectionDialog
MicrosoftVisualStudio里面的资源之数据库连接配置
这个功能的实现主要是用了Microsoft.Data.ConnectionUI.dll和Microsoft.Data.ConnectionUI.Dialog.dll这个二个动态库,可以在VS的安装目录的Common7\IDE这个目录下面找到(本机的安装路径C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE)。
找到两个组件 Microsoft.Data.ConnectionUI.dll,Microsoft.Data.ConnectionUI.Dialog.dll
这两个要一起引用下
Microsoft.Data.ConnectionUI.dll
Microsoft.Data.ConnectionUI.Dialog.dll
测试代码。ok
string ConnString = null;
bool isSqlServer = false;
private void btnTestDataConnectionDialog_Click(object sender, EventArgs e)
{
//服务器名称 LENOVO-PC\MYSQLEXPRESS
using (Microsoft.Data.ConnectionUI.DataConnectionDialog dlg = new DataConnectionDialog())
{
//添加数据源
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.AccessDataSource);
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.OdbcDataSource);
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.OracleDataSource);
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.SqlDataSource);
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.SqlFileDataSource);
//设置默认数据提供对象
dlg.SelectedDataSource = Microsoft.Data.ConnectionUI.DataSource.SqlDataSource;
dlg.SelectedDataProvider = Microsoft.Data.ConnectionUI.DataProvider.SqlDataProvider;
dlg.Text = "连接DCWriter演示数据库";
//只能够通过DataConnectionDialog类的静态方琺Show出对话框
//不同使用dialog.Show()或dialog.ShowDialog()来呈现对话框
if (Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(dlg) == System.Windows.Forms.DialogResult.OK)
{
//连接字符串"Data Source=LENOVO-PC\\MYSQLEXPRESS;Initial Catalog=TestDB;Integrated Security=True"
ConnString = dlg.ConnectionString;
isSqlServer = dlg.SelectedDataSource == Microsoft.Data.ConnectionUI.DataSource.SqlDataSource
|| dlg.SelectedDataSource == Microsoft.Data.ConnectionUI.DataSource.SqlFileDataSource;
}
MessageBox.Show(ConnString);
}
}
这是本人写的代码的一部分,后面会展示具体的界面显示
private static IDbConnection InnerCreateConnect()
{
if (string.IsNullOrEmpty(_ConnectionString))
{
string dbFile = System.IO.Path.Combine(Application.StartupPath, "EMR.mdb");
if (File.Exists(dbFile))
{
// 存在演示数据库文件
_ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=EMR.mdb";
_IsSQLServer = false;
}
else
{
try
{
using (Microsoft.Data.ConnectionUI.DataConnectionDialog dlg = new Microsoft.Data.ConnectionUI.DataConnectionDialog())
{
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.AccessDataSource); // Access
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.SqlDataSource); // Sql Server
dlg.DataSources.Add(Microsoft.Data.ConnectionUI.DataSource.SqlFileDataSource); // Sql Server File
// 初始化
dlg.SelectedDataSource = Microsoft.Data.ConnectionUI.DataSource.AccessDataSource;
dlg.SelectedDataProvider = Microsoft.Data.ConnectionUI.DataProvider.OleDBDataProvider;
dlg.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=www.mdb";
dlg.Text = "连接演示数据库";
//只能够通过DataConnectionDialog类的静态方琺Show出对话框
//不同使用dialog.Show()或dialog.ShowDialog()来呈现对话框
if (Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(dlg) == DialogResult.OK)
{
_ConnectionString = dlg.ConnectionString;
_IsSQLServer = dlg.SelectedDataSource == Microsoft.Data.ConnectionUI.DataSource.SqlDataSource
|| dlg.SelectedDataSource == Microsoft.Data.ConnectionUI.DataSource.SqlFileDataSource;
}
}
}
catch (Exception ext)
{
MessageBox.Show(ext.Message);
_ConnectionString = null;
}
}
}
if (string.IsNullOrEmpty(_ConnectionString) == false)
{
if (_IsSQLServer)
{
SqlConnection conn = new SqlConnection(_ConnectionString);
return conn;
}
else
{
OleDbConnection conn = new System.Data.OleDb.OleDbConnection(_ConnectionString);
return conn;
}
}
return null;
}
界面以及操作如下
1、代码如下:
DataSource.AddStandardDataSources(dlg);
if (DataConnectionDialog.Show(dlg) == System.Windows.Forms.DialogResult.OK)
{
//Clipboard.SetText(dlg.ConnectionString);
MessageBox.Show(string.Format("{0}\r{1}", dlg.ConnectionString, dlg.SelectedDataProvider.DisplayName));
}
2、数据源选择
3、属性选择
4、完成后通过ConnectionString属性获取连接字符串
总结:
以上操作时每次都会弹出的,建议设置默认的,这样的话只有在更换数据源的时候再出现,其他时候都是默认数据库的(可以默认sql数据库)
主要是用到以下三条语句
//设置数据源
dlg.SelectedDataSource = DataSource.SqlDataSource;
//设置提供程序
dlg.SelectedDataProvider = DataProvider.SqlDataProvider;
//默认的连接字符串
dlg.ConnectionString = "Data Source=LocalHost;Intergated Security=SSPI;Initial Catalog=TestDB";
下面是另一种方法
这个功能的实现主要是用了Microsoft.Data.ConnectionUI.dll和Microsoft.Data.ConnectionUI.Dialog.dll这个二个动态库,可以在VS的安装目录的Common7\IDE这个目录下面找到。添加引用就不多说了。要想实现简单的,VS提供的几个数据库类型的支持,在这2个动态库的支持下很是方便啊。代码如下:
Microsoft.Data.ConnectionUI.DataConnectionDialog diag = new Microsoft.Data.ConnectionUI.DataConnectionDialog(); Microsoft.Data.ConnectionUI.DataSource.AddStandardDataSources(diag); Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(diag);运行后的效果如下:
本来显示的应该都是英文的,但是只需要在bin目录下面建一个zh-CHS的目录,将Microsoft.Data.ConnectionUI.Dialog.resources.dll拷入到该目录下面,运行之后就是中文界面的,得到的效果就是上图中所显示的了。如果要自己定义一个数据源,让他支持所有的DataProvider,就需要先new一个DataSource出来,然后给这个DataSource添加DataProvider。代码如下:
Microsoft.Data.ConnectionUI.DataConnectionDialog diag = new Microsoft.Data.ConnectionUI.DataConnectionDialog();DataSource d = new DataSource("自定义类型1", "支持所有的DataProvider");d.Providers.Add(DataProvider.OdbcDataProvider);d.Providers.Add(DataProvider.OleDBDataProvider);d.Providers.Add(DataProvider.OracleDataProvider);d.Providers.Add(DataProvider.SqlDataProvider);DataSource d2 = new DataSource("自定义类型2", "支持部分DataProvider");d2.Providers.Add(DataProvider.OdbcDataProvider);d2.Providers.Add(DataProvider.OleDBDataProvider);diag.DataSources.Add(d);diag.DataSources.Add(d2);DataConnectionDialog.Show(diag);
上面的代码运行后的效果是下面右边的图,左边的是只添加一个DataSource,添加了所有的DataProvider之后的效果。右边的这个效果就可以类似创建出来了。
现在我有一个麻烦,现在添加的都只是VS自带的DataProvider,如果我想创建一个用来连接Sqlite的ConnectionUI,或者是支持mysql的ConnectionUI,该怎么做?虽说DataProvider可以自己new一个出来,但是最终加入到DataSource中之后,运行出来的效果完全就不是我想要的效果。用如下代码:
DataConnectionDialog dlg = new DataConnectionDialog();
DataSource d = new DataSource("Sqlite","Sqlite数据源");
DataProvider p = new DataProvider("Sqlite数据提供程序", "Sqlite数据提供程序", "Sqlite", "用来连接Sqlite数据库");
d.Providers.Add(p);
dlg.DataSources.Add(d);
DataConnectionDialog.Show(dlg);
可得运行效果如下:
就只有一个ConnectionString属性了,而且不管我里面写什么,测试连接的时候总是成功的。Sqlite有一个ADO.NET 2.0/3.5 SQLite Data Provider,我安装了之后,添加sqlite数据源的时候运行出来的效果是这样的:
其实这个效果才是我想要的效果,不知道VS是怎么显示出这个对话框的。要是想在自己的程序中用的话该怎么实现。我只知道安装的那个ADO.NET 2.0/3.5 SQLite Data Provider之后,有一个应该是用来支持这个对话框的动态库,SQLite.Designer.dll,里面封装了一个SQLiteConnectionUIControl,我觉得上面这个图的显示效果,就是这个SQLiteConnectionUIControl了。刚刚测试了一下,这个SQLiteConnectionUIControl应该是上面那个图中英文显示部分,从Database到下面的Password那一块.要想直接拿来重用还是有点麻烦啊,不知道有没有高人有好的办法。我这里是拿Sqlite为例子,要想拿mysql的实现相同的功能也有同样的问题,因为他们都不是VS自带的DataProvider中的一员。
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2012-12-29 Three20