簡體   English   中英

EF ConnectionString 問題關鍵字不支持“元數據”

[英]EF ConnectionString Problem keyword not supported 'metadata'

connectionString="
   metadata=res://*/Database.AttidudeDB.csdl|res://*/Database.AttidudeDB.ssdl|res://*/Database.AttidudeDB.msl;
   Provider=SQLOLEDB;Data Source=.net;Initial Catalog=DB_;User Id=admin;Password=*****;
   application  name=EntityFramework"" 

providerName="System.Data.SqlClient"

我將我的數據庫上傳到 sql Server 並且我收到此錯誤“不支持關鍵字'metdata'任何人都可以幫忙

如果您使用 SQL 身份驗證,您只需要:

Data Source=[ServerName];Initial Catalog=[DatabaseName];Integrated Security=False;User ID=[UserName];Password=[Password]

對於 Windows 身份驗證:

數據源=[服務器名稱];初始目錄=[數據庫名稱];集成安全性=真;

如果您有興趣,我有一個開源項目,它在工具文件夾中帶有一個 Connection String Builder 項目:

https://github.com/DataJuggler/DataTier.Net

連接字符串生成器:

在此處輸入圖片說明

嗨,我在非常艱難的一天之后解決了它,它是連接字符串問題,它像這樣鎖定:

 <add name="AttitudeUnitDBEntities" 
   connectionString=" metadata=res://*/Database.AttidudeDB.csdl|res://*/Database.AttidudeDB.ssdl|res://*/Database.AttidudeDB.msl;
   provider=System.Data.SqlClient;
   provider connection string=&quot;
   data source=www.net.com;
   initial catalog=DB_A;
   persist security info=True;user id=admin;
   password=********;MultipleActiveResultSets=True;App=EntityFramework&quot;" 
   providerName="System.Data.EntityClient" />

暫無
暫無

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

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