SQL Server CE to SQL Server

1

I have a standalone C# application using a SQL Server CE database. Another online program running on ASP.NET with a SQL Server database. Now I want to upload the standalone generated .sdf file to my ASP.Net program via browser and migrate the data into SQL Server. The code works fine in local server. But when I upload in Godaddy server and test I get this error

Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have uploaded all the dll files.

Sometimes this error occurs

Upload status: The file could not be uploaded. The following error occured: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)

Is there a work around?

Or how to migrate the sdf file data to xml via code and upload the xml file online to be parsed and enter the data in SQL Server?

sql-server
sql-server-ce
migrate
asked on Stack Overflow Sep 19, 2012 by Vinodh • edited Sep 19, 2012 by marc_s

1 Answer

0

I am replying to my own question so that it can be useful to others. Tried various options. Uploading mdb file needs Access drivers to be installed in godaddy server which needs upgrading my web hosting plan. Hence best option was to upload required dlls for sdf file. Upgrading VS2010 to VS2010SP1 gave an option of deployable dependencies which enabled automatic uploading of dlls needed for sdf files. This the best option as there are numerous dlls needed for proper uploading and functioning of sdf file in hosted environment. Got the answer after upgrading VS2010SP1.

answered on Stack Overflow Oct 3, 2012 by Vinodh • edited Oct 3, 2012 by Vinodh

User contributions licensed under CC BY-SA 3.0