2013-06-21 39 views
0

訪問數據庫,我開發了簡單地從sql database返回一些名字一個Web服務。當我從visual studio web服務器編譯這個web服務時,該服務工作正常,我可以從sql database中檢索名稱。 我對Windows 7託管在iis7服務。該服務運行良好,但無法從數據庫獲取數據。 蔭收到以下錯誤:無法從IIS

"A connection was successfully established with the server, but then an error occurred during the pre-login handshake.."

當我調試我的服務從IIS,錯誤的是 connection.serverversion throws system.invalidoperationexception ... 我不要有任何線索如何解決這個問題。請在這方面幫助我。 我正在使用sql server 2008

+0

檢查此問題http://stackoverflow.com/questions/3270199/a-connection-was-successfully-established-with-the-server-but-then-an-error-occ – Max

+0

否..它力氣解決我的問題....當我從iis運行這個應用程序時,我的視覺工作室沒有運行。即使我檢查了Web服務器服務..它不存在... – codewarrior

+0

iis應用程序池的用戶可以訪問/讀取數據庫嗎? – Max

回答

0

潛在解決方案:

1-運行netsh Winsock reset命令。可能它會解決你的問題。

編號:https://serverfault.com/questions/423013/sql-an-error-occurred-during-the-pre-login-handshake/487139#487139

2 - 確保您的ConnectionString DEOS不包括:

Encrypt=True 
Persist Security Info=True 

3-保存更改並重新啓動Visual Studio。重新啓動您的IIS。在 「服務」

4-啓動SQL Server瀏覽器(控制面板)。

5 - 確保有足夠的內存來運行Web服務。