How to use sqlserver CE 3.5 in ASP.NET

That's look easy, but it is not at all ! thanks to Olivier Huet of Winwise for help me on this.

First, you should know that sql compact edition is not do for work in asp.net !!! That's strange for me !


So for use it in ASP.NET you must put in your global.asax, in ApplicationStart:

AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting",true);

That's all ? no !
Proud of yourself, you put a gridview, a sqldatasource,and run. That's don't work.
What's the problem ? the problem is the Wizard is out of date !
So,for that's work, go to your webconfig.xml (i know,we don't like that) and change your connection string by:
providerName=System.Data.SqlServerCe.3.5 />

Now that's work. (and I lost 4 hours of my life on it,thanks the wizard :( )