SQL Server Compact is not intended for ASP.NET development.

Posted by Tripati_tutu under Error and Solution on 11/10/2010 | Points: 10 | Views : 11777 | Status : [Member] | Replies : 1

When I was trying to connect to SQL Server CE from my ASP.NET website, I was getting following error.

SQL Server Compact is not intended for ASP.NET development.


To solve this problem, I found that I need to add following to my global.asax file.

void Application_Start(object sender, EventArgs e) 
{
// Code that runs on application startup
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);

}


Hope this will help someone.

Thanks




Responses

Posted by: Vuyiswamb on: 11/10/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Thanks for Sharing.



Thank you for posting at Dotnetfunda
[Administrator]

Tripati_tutu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response