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="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" />
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.
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" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With