I've been trying to edit my connection string for uploading my website to a server.
I am not really experienced with this. I got this exception: the Keyword not supported: 'server'.
Here is my connection string:
<add name="AlBayanEntities" connectionString="Server=xx.xx.xxx.xxx,xxxx;Database=AlBayan;Uid=bayan;Password=xxxxx;" providerName="System.Data.EntityClient" />
I've tried embed this string into my old connection string which works very well locally, but it didn't fit : S
Best Answer
For Entity Framework (database-first or model-first; when you have a physical EDMX model file) you need to use a special type of connection string which is quite different from the straight ADO.NET connection strings everyone else has mentioned so far...
The connection string must look something like:
Inside this connection string, you'll find the
provider connection string=
attribute which is basically your ADO.NET connection string:So here, you need to change your server name and possibly other settings.
data source=....
stands for your server (you can also useserver=.....
)initial catalog=.....
stands for your database (you can also usedatabase=....
)