Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

CMS 7.5 won´t work when published in precompile mode

Vote:
 

Hi,

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

Regards,
Petra

#89425
Aug 15, 2014 17:33
Vote:
 

Hi

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).

#89429
Aug 15, 2014 19:53
Vote:
 

AH HA, really good to know this trick. 

thanks Johan

#89470
Aug 18, 2014 11:38
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.