Vulnerability in EPiServer.Forms
Has anyone experienced problems with deploying a CMS 7.5 site when checking the "precompile" checkbox during publish in VS2013?
I created an EPiServer 7.5 site from Visual Studio (where you get a local DB) using the Visual Studio Extension. All working and everyone is happy, but when I published it from VS2013 I checked the "precompile" checkbox (mainly 'cause I wasn´t really sure what it was good for :)) and then deployed the site and added the DB to SQL Server on the server. The site worked to some extent, the startpage just returned "Resource couldn´t be found" but I was able to login and see my pages that I created on my local machine and the settings in "Manage Websites" was all there (because the DB had been used from development), but the problem was that edit mode didn´t show anything when I tried to look at them, they were just blank and browsing didn´t work at all.
It took a couple of frustrated hours but then I tried to deploy the exact same code and database but without checking the "precompile" checkbox and voila! the site worked and I could browse it, edit in edit mode and all was fine.
My question is now if anyone has any idea of why the site didn´t work precompiled? I´m curious :)
ASP.NET works so that when an app is precompiled then it is not possible to programmatically add VirtualPathProviders (as the EPiServer UI does for the UI resources). Unfortunately it does not throw any explaneritary exception but instead just swallows the call... So since EPiServer UI requires programatic VPP registration you can not run EPiServer in precompiled mode (at least not if you need edit mode on the server you deploy the compiled code to).
AH HA, really good to know this trick.