User-599955823 posted
Hello I am facing the same problem.
I don't think it is the metadata problem.
if I change this
<add name="MyDataModel1Container" connectionString="metadata=res://*/Models.MyDataModel1.csdl|res://*/Models.MyDataModel1.ssdl|res://*/Models.MyDataModel1.msl;provider=System.Data.SqlServerCe.4.0;provider connection string='Data Source=|DataDirectory|\DatabaseCE1.sdf'" providerName="System.Data.EntityClient" />
to this
<add name="MyDataModel1Container" connectionString="metadata=res://*/Models.MyDataModel1.csdl|res://*/Models.MyDataModel1.ssdl|res://*/Models.MyDataModel1.msl;provider=System.Data.SqlServerCe.4.0;provider connection string='Data Source=DatabaseCE1.sdf'" providerName="System.Data.EntityClient" />
Then, I can publish, but, my app would not be able to find DatabaseCE1.sdf anymore because I removed |DataDirectory|.
I publish this app as sub-app. Meaning, it is under my
www.mysite.com/mvc-test/ , not directly under
www.mysite.com , which maybe the cause of the problem.
Please help, thank you.