Exonya as Software development company can offer you IT solutions based on modern technologies to satisfy your business requirements. As IT industry is fast evolving we (as software developers) should keep abreast on the all of latest technologies. It helps us to produce modern and robust software for our customers. It could be web-based solutions, desktop applications or Rich Internet Applications (RIA).

English (United Kingdom)Russian (CIS)
Saturday, 02 October 2010 22:04

How to fix Issue in ASP.NET and SQL Server Compact Edition as a database

Written by  Administrator
Rate this item
(0 votes)

Sometimes it's necessary to use SQL CE database in ASP.NET site. In one of our projects we decided to do so but we got exception - "sql server compact is not intended for asp.net development". The workaround is quite simple - just add one line of code into Application_Start, like this:

protected void Application_Start(object sender, EventArgs e)
{
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
}

Happy coding!

Login to post comments

Software Outsourcing Company

Let's drive your business processes with Exonya - IT solutions for everyone!

You are here:   HomeOur blogHow to fix Issue in ASP.NET and SQL Server Compact Edition as a database