2012-09-19 115 views
0

通過Sql Server的Management Studio連接工作,但它不會通過web.config連接字符串連接。連接SQL Server身份驗證

<add name="cnString" connectionString="Data Source=(local); Initial Catalog=MyDB; User ID=andrewbb; Password=myPassword;" providerName="System.Data.SqlClient" /> 

返回: 登錄用戶'andrewbb'失敗。原因:密碼與提供的登錄信息不符。 [客戶端:]

密碼和用戶標識都是小寫。想法?

+0

它是一個窗口ID或SQL ID?如果它的sql ID您可能需要添加「Integrated Security = false」 – BugFinder

+0

您是否在Sql Server的Management Studio中分別設置了MyDB數據庫的密碼和用戶名? – 2012-09-19 06:49:37

+0

你是在一個域名?您的SQL Server僅設置爲Windows身份驗證模式? (這可以在Sever-Properties - > Security中檢查) – konqi

回答

相關問題