2012-06-18 75 views
0

目前我有Windows應用程序直接打開數據庫連接(SQL Server遠程坐着)使用SqlConnection對象沒有任何適當的安全措施。如何使用證書保護SQL Server數據庫連接?

現在我需要使用證書來保護數據庫連接。我讀了一些關於在SQL Server和Windows應用程序上添加證書的內容。但我並沒有清楚地知道如何做到這一點,也不知道它將會如何有效。有人可以給我一些想法,有用的鏈接to articale,或示例代碼?

我的一位朋友建議我創建「Web服務」並將其託管在IIS上,因爲我們可以在IIS上爲「Web服務」配置證書。並從我的Windows應用程序中調用該WebService。但我不確定這個解決方案有多好。

非常感謝advace爲幫助我而付出的努力。

回答

1

此鏈接在這裏解釋循序漸進(How To: Use SSL to Secure Communication with SQL Server) - http://msdn.microsoft.com/en-us/library/ff649255.aspx

Step 1. Request and Install a Server Authentication Certificate 
Step 2. Verify that the Certificate Has Been Installed 
Step 3. Install the Issuing CA's Certificate on the Client 
Step 4. Force All Clients to Use SSL 
Step 5. Allow Clients to Determine Whether to Use SSL 
Step 6. Verify that Communication Is Encrypted 

而且,當時讀到這裏 - How to enable SSL encryption for SQL Server 2000 if you have a valid Certificate Server

http://support.microsoft.com/default.aspx?scid=kb;en-us;276553

這可能給你一些想法&方向。

+0

謝謝Angshuman。這對跳躍開始非常有幫助。 – Shai