In order to enable this behavior, simply add one line of code to your application:
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
Steve Lasker has a good write up of this, too. The bottom line is this isn't recommended, so be sure to fully understand the implications before blindly enabling this parameter.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.