MSSQLCE has a built-in limitation that it will not work when used inside an ASP.NET application. According to the MSDN documentation for
SqlCeConnection, this is due to the fact that the code wasn't written with this scenario in mind. I have seen tools be used outside of the intended use many times over my career, so I understand where the team was coming from. I am even more impressed that they put a simple check in place to allow you to effectively say "I know what I'm doing better than you do, so let me do it anyways".
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.