Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyword not supported: 'metadata'

I am trying to publish my mvc 3 project but i can`t connect to the sql server(using EF), because of the wrong connection string. Here it is:

  <add name="PackStoreEntities" connectionString="metadata=res://*/Models.PackStore.csdl|res://*/Models.PackStore.ssdl|res://*/Models.PackStore.msl;provider=System.Data.SqlClient;provider connection string=&quot;workstation id=PackStore.mssql.somee.com;packet size=4096;user id=*****;pwd=****;data source=PackStore.mssql.somee.com;persist security info=False;initial catalog=PackStore&quot;" providerName="System.Data.EntityClient" />

I took this part form the my hoster:

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

Mvc project works well on the local server, but when publishing i get "Keyword not supported: 'metadata' " . Where is my mistake? Thnaks for the answers.

like image 544
AlexSolovyov Avatar asked Nov 25 '25 06:11

AlexSolovyov


1 Answers

try this one...

<add name="PackStoreEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string='Data Source=PackStore.mssql.somee.com;Initial Catalog=PackStore;User ID=***;Password=****;'"  providerName="System.Data.EntityClient" />

Edit..

<add name="PackStoreEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string='workstation id=PackStore.mssql.somee.com;packet size=4096;user id=*****;pwd=****;data source=PackStore.mssql.somee.com;persist security info=False;initial catalog=PackStore;'" providerName="System.Data.EntityClient" />
like image 195
naim shaikh Avatar answered Nov 27 '25 19:11

naim shaikh