我不得不從SQL Server身份驗證更改爲Windows身份驗證:從SQL Server更改連接字符串的Windows身份驗證
我的SQL Server身份驗證字符串是:
<add name="GCDataContext"
connectionString="Data Source=111.78.152.64;Initial Catalog=GC;User Id=sa;Password=xxxx;Trusted_Connection=False;Persist Security Info=True;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient" />
改爲(非工作)
<add name="GCDataContext"
connectionString="Data Source=111.78.152.64;Initial Catalog=GC;Persist Security Info=True;Integrated Security=True;"
providerName="System.Data.SqlClient" />
任何人都可以幫助我嗎?
Integrated Security=True
用於Windows身份驗證,但連接未建立。
做一個測試UDL文件,以獲得參考windows身份驗證連接字符串。 – Hassan
SQL服務器是否啓用了Windows驗證?應用程序運行在哪個帳戶? (提示:對於asp.net,它可能不是一個有用的) - 該帳戶是否有權訪問服務器?和數據庫?最重要的是:究竟是什麼**是錯誤信息? –
一方與sa連接,另一方與當前連接的windows用戶連接。該用戶是否具有訪問數據庫的適當權限? –