Azure error while using EF again. SQL Server CE 4.0 Database

I have an ASP.NET MVC 3 application that I want to deploy to Azure. The application uses EF for the SQL Server CE 4.0 database in the App_Data directory.

The site works fine locally, but when I link to it from the ASP.NET MVC 3 web role and publish it to Azure, I get this error:

"Cannot find the requested .Net Framework data provider. It may not be installed." The full exception can be seen here: http://52df5a4a5c1b4d10a927078bb8a06d15.cloudapp.net/drug

Here is the connection string from the web.config file:

<add name="DbEntities" connectionString="metadata=res://*/AMDBModeledmx.csdl|res://*/AMDBModeledmx.ssdl|res://*/AMDBModeledmx.msl;provider=System.Data.SqlServerCe.4.0;provider connection string=&quot;Data Source=|DataDirectory|\AMDB.sdf&quot;" providerName="System.Data.EntityClient" /> 

I tried to compile my project for the target x86 and set the Copy Local property of the System.Data.Entity link to true. Nothing helps.

Is it possible to run a web application in Azure and use a file database? I understand that this may be a problem with multiple instances, but I only use one virtual machine.

+4
source share
1 answer

I do not see your error page, but it seems that the SQL CE data provider DLL is missing. Have you tried following these instructions?

http://blogs.msdn.com/b/webdevtools/archive/2011/01/06/how-to-bin-deploy-sql-compact-edition-4-0-and-razor-web-projects.aspx

+3
source

All Articles