[EPiTrace 1.0.0.82] BUG: Site stops working after install

Vote:
 

My entire site stopped working after installing EPiTrace/Live Monitor. It looks like the new version uses control injection.

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +8678903
   EPiServer.Trace.CMS.Web.WebControls.VisitTrackerPlugin.sender_PreRender(Object sender, EventArgs e) +144
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8684342
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Sugestion #1: Do not assume that you can insert control. Eat the exception, set a flag and show an error message in the monitor instead.

Sugestion #2: Use the FURL rewriter to inject code at the end of the document in the same way like the ViewStateMover does (see public templates) if control injection fails.

Sugestion #3: If all fails, let the developer add a control (or call a method for mvc) manually.

 

#36276
Jan 22, 2010 11:52
Vote:
 

Thank you for bringing this up. We will certanly look into this.

Meanwhile (for anyone wanting to use live monitor), there are two workarounds:

1. Disabling the page plug-in in admin mode's plug-in manager and adding the EPiServer.Trace.CMS.Web.WebControls.VisitTracker web control to the master page.

2. Enclosing code blocks within a <asp:PlaceHolder runat="server"

#36281
Jan 22, 2010 13:04
Vote:
 

Hi Fredrik

Thanks for finding and reporting this. Here's a small update on what we did to solve it.

Fixed so that we eat any exceptions thrown when we try to add the control. If that happens we also add a log message.

Also tested that you can add the webcontrol manually to the page, incase the control injection failed.

We decided to not implement your second suggestion. Not that it was a bad one, but it fell too low in the priority chain. Hopefully the solution is still enough so that Live Monitor (EPiTrace), can function in all scenarios.

Regards

Per Gunsarfs
EPiServer development team

#36528
Feb 01, 2010 16:38
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.