您的当前位置:首页正文

keyword not supported data source 或者Keyword not supported: 'server'的问题解决办法

来源:九壹网

What you have is a valid ADO.NET connection string - but it's NOT a valid Entity Framework connection string.

The EF connection string would look something like this:

<add name="testEntities" 
     connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=test;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" 
     providerName="System.Data.EntityClient" />

Inside this connection string, you'll find the provider connection string= attribute which is basically your ADO.NET connection string:

provider connection string=&quot;data source=(local);initial catalog=test;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" 

So here, you need to change your server name and possibly other settings.

  • data source=.... stands for your server (you can also use server=.....)
  • initial catalog=..... stands for your database (you can also use database=....)

因篇幅问题不能全部显示,请点此查看更多更全内容

Top