我收到此錯誤試圖訪問我的網站:SQL連接錯誤
Exception information:
Exception type: SqlException
Exception message: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
這個錯誤在一整天發生6-7次。
有誰能告訴我爲什麼我得到這個錯誤?有什麼特殊的設置可以在我的SQL服務器端進行,以避免在我的Web應用程序中出現這種崩潰或問題?
如果您發佈連接字符串(沒有密碼/用戶名稱of course),這將會有所幫助。 – JConstantine
如果您的連接通常有效並且有時不起作用,那麼我可以考慮網絡問題(例如大流量)或高負載在服務器上,它不會響應新的連接嘗試。 – Marco
可能是您的網站正在循環訪問數據庫,導致數據庫非常繁忙,以至於它在一段時間內不可用,並引發此類錯誤。爲此,您應該查看db – Badr