简体   繁体   中英

The underlying provider failed to open - WPF and Entity FrameWork

I registered website on somee.com and had uploaded my database. They provided me connection string below:

workstation id=nrcsadb.mssql.somee.com;packet size=4096;user id=DuaZoya_SQLLogin_1;pwd=passwordhere;data source=nrcsadb.mssql.somee.com;persist security info=False;initial catalog=nrcsadb

Now as i am using Entity FrameWork so i am writing these lines below to connect my destop application to that database on server.

  <connectionStrings>
  <add name="nrcsaEntities" connectionString="metadata=res://*/nrcsaEntities.csdl|res://*/nrcsaEntities.ssdl|res://*/nrcsaEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;user=Dua_SQLLogin_1;password=passwordhere;data source=nrcsadb.mssql.somee.com;initial catalog=nrcsadb;integrated security=False;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>

This above connection string is generating exception that: Main Window The underlying provider failed to open

How to solve this problem. Can anyone help me. Thank You !

可能未设置System.Data.Entity.dll引用尝试使用providerName =“ System.Data.SqlClient”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM