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 :( )





How to slim your flex project!!!

Flex is great but a little too big : 1 mega for have all  libraries. For a small project ,that's not very good,So I find a magical option :



With this option, the flex library will be linked with your swf, so :
  • ONE swf, not many as usual
  • All not used part of library will be erased of your SWF !
On my small project, with embedded font, sprite, mxml, it is from 1300kb to 432kb  ! 3 times less !
Use it without any restriction !