I am using sqlce database in my rest service.I have placed sqlce4.0 database in app_data folder and included all sql ce dlls in my bin folder.
Now if i publish this service to the iis server where sql server compact 4.0 is installed then its accessible but its not accessible where sqlserver compact 4.0 is not installed.
even I have included all sql ce dlls then also its giving me error saying File or directory not found.
Could anyone tell me that sql server compact installation is really necessary as our client wont like to have all the s/w installed to access db. There must be some other dlls.
Based on the link that you mentioned, it says that we can use the Private file-based deployment way. (Just deploy the SQL Server Compact DLLs)
So, I think the SQL Server Compact isn’t necessary installed in the server.
Please follow those steps and try again. (Just included all dlls in the bin folder is useless)
To open the Project Designer, in Solution Explorer/Database Explorer, double-click My Project if you are working on a Visual Basic project (or Properties if you are working on a C# project).
Click the Publish tab.
Click Prerequisites and then clear the check box for SQL Server Compact.
Close the Project Designer.
Go to the directory that contains the SQL Server Compact DLLs. These are located in C:\Program Files\Microsoft SQL Server Compact Edition\v4.0.
Select the seven SQL Server Compact DLLs and copy them:
Sqlceca40.dll
Sqlcecompact40.dll
Sqlceer40EN.dll
Sqlceme40.dll
Sqlceoledb40.dll
Sqlceqp40.dll
Sqlcese40.dll
Paste the DLLs into the project in Solution Explorer/Database Explorer.
Select all seven DLLs in Solution Explorer/Database Explorer and open the Properties window.
Set the Copy to Output Directory property to Copy if newer.
This will replace any earlier DLLs in an existing application with the newer ones if the application is updated.
Click the Show All Files button in Solution Explorer/Database Explorer.
Expand the References node.
Select System.Data.SqlServerCe.
Set the Copy Local property to True.
Because your development computer has the SqlServerCe DLLs in the global assembly cache, you must configure the application to use the DLLs in the output directory.
Right-click the project in Solution Explorer/Database Explorer and select Publish to open the Publish Wizard.
Complete the wizard to publish the application.
If you still have the issue, please provide the detail error message.
Thanks
Best Regards
We are trying to better understand customer views on social support experience. Click HERE to participate the survey. Thanks!
None
0 Points
3 Posts
Deploy web api with sqlce database
Dec 19, 2013 07:31 AM|KavitaAggrawal|LINK
Hi,
I am using sqlce database in my rest service.I have placed sqlce4.0 database in app_data folder and included all sql ce dlls in my bin folder.
Now if i publish this service to the iis server where sql server compact 4.0 is installed then its accessible but its not accessible where sqlserver compact 4.0 is not installed.
even I have included all sql ce dlls then also its giving me error saying File or directory not found.
I have gone through this link also : http://msdn.microsoft.com/en-us/library/aa983326(v=vs.110).aspx
But no Luck !!!
Could anyone tell me that sql server compact installation is really necessary as our client wont like to have all the s/w installed to access db. There must be some other dlls.
Really looking forward for your reply.
Thanks!!!!
All-Star
193986 Points
28020 Posts
Moderator
Re: Deploy web api with sqlce database
Dec 19, 2013 11:45 AM|Mikesdotnetting|LINK
What line of code throws that error?
All-Star
23975 Points
4084 Posts
Re: Deploy web api with sqlce database
Dec 20, 2013 01:07 AM|Starain chen - MSFT|LINK
Hi Kavita,
Based on the link that you mentioned, it says that we can use the Private file-based deployment way. (Just deploy the SQL Server Compact DLLs)
So, I think the SQL Server Compact isn’t necessary installed in the server.
Please follow those steps and try again. (Just included all dlls in the bin folder is useless)
Sqlceca40.dll
Sqlcecompact40.dll
Sqlceer40EN.dll
Sqlceme40.dll
Sqlceoledb40.dll
Sqlceqp40.dll
Sqlcese40.dll
If you still have the issue, please provide the detail error message.
Thanks
Best Regards