簡體   English   中英

SQL Server連接字符串

[英]SQL Server Connection String

好的,這里是總菜鳥問題。 我正在玩Silverlight,並且需要連接到數據庫。 當我連接到服務器資源管理器(VS 2010)時,它工作正常,因為它使用的是Windows帳戶進行身份驗證。 但是,當我開始調試時,服務器端的東西正在另一個帳戶(NT-SERVICE或類似的帳戶)上運行,該帳戶在SQL Server上沒有特權。 我已經嘗試嵌入我的用戶名/密碼,如下所示:

connectionString="Data Source=.;Initial Catalog={DATABASE};Integrated Security=True;User={DOMAIN}\\{USERNAME};Password={redacted}"

但它似乎不起作用。 我不斷收到錯誤消息:

The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

感謝您的幫助,

埃里克

嘗試用戶ID = ,而不是User =

  connectionString="Data Source=.;Initial Catalog={DATABASE};Integrated Security=True;User Id={DOMAIN}\{USERNAME};Password={redacted}"

http://www.connectionstrings.com/

原來,我沒有將DataContracts添加到我的Linq-to-Sql類中。 從linq-to-sql設計器中,將序列化設置為Unidirectional。 事實證明,它與連接字符串完全無關。 嘆...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM