![](/img/trans.png)
[英]Unable to connect to SQL Server using a connection string with Windows authentication
[英]How do I connect to SQL Server using OLEDB using Windows Authentication connection string
我有在Windows身份驗證模式下運行的SQL Server 2010,並且已分配了適當的組。 我可以使用Windows身份驗證通過SQL Server Client Studio連接。 這樣可行。 但是,當使用.NET OLEDB連接進行連接時,它將失敗,我無法弄清原因。
這是字符串:
data source=172.20.0.113;initial catalog=ForgeEnterprise;Integrated Security=SSPI;multipleactiveresultsets=True;App=EntityFramework
這是錯誤:
Login failed for user 'MOMENTUMI\jmcclure'
有什么我想念的嗎?
根據http://connectionstrings.com/sql-server-2008,這應該可以解決問題
Provider=SQLNCLI10;Server=172.20.0.113;Database=ForgeEnterprise;Trusted_Connection=yes;
其中,Trusted_Connection與集成安全性顯然相同。
如果這不起作用,則應驗證是否已在數據庫的“權限”選項卡(圖片)中添加了該用戶,但我想您已經這樣做了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.