Bug Found. Doesn't work with GaiaWare.net controls.

31 views
Skip to first unread message

John Welborn

unread,
Dec 29, 2011, 1:50:52 PM12/29/11
to Cassette
I found out yesterday after way too much trial and error that if you
have a gaia control on the webform it won't render anything. I don't
get any errors, but absolutely nothing is rendered. Not even a blank
html document. There is literally _nothing_ in the view source. But
if you remove the gaia control everything works.

I don't really know how to do any further testing as there are no
errors. Running in debug mode doesn't catch anything. You can step
through the .aspx page and see where it executes the bundle commands
but after you go though the page it's just blank.

I'll post over at the gaiaware site as well. FYI, Gaia is an AJAX
framework for webforms. We're now moving to MVC and jquery, but many
of our older pages are still using the Gaia controls.

Let me know if you have any suggestions.
John

John Welborn

unread,
Dec 29, 2011, 4:53:29 PM12/29/11
to Cassette
Maybe another way to look at it, or another question to ask, is there
a way to disable Cassette on our webforms pages? It's lovely for MVC,
but it's just causing problems on the webforms pages. I'd prefer to
just leave those alone.

John Welborn

unread,
Dec 30, 2011, 9:15:24 AM12/30/11
to Cassette
Sweet. I just found that if I turn set rewriteHtml="false" everything
goes back to working. Yay!!

Andrew Davey

unread,
Jan 3, 2012, 9:13:34 AM1/3/12
to cass...@googlegroups.com
Nice work tracking down a work-around. I'm not sure why the output rewriting is breaking the page. Perhaps the Gaia control is also installing a response filter that conflicts with Cassette's. Let me know if you see it happening with other controls as well.

Another useful trick to know is that the following will disable rewriting just for the current request:
HttpContext.Current.Items.Add("Cassette.IsHtmlRewritingEnabled", false);
Make sure it's added before the PostRequestHandlerExecute asp.net pipeline step is executed e.g. on page load.

Of course if you don't need rewriting at all, then leave it completely switched off in web.config.

John Welborn

unread,
Jan 4, 2012, 11:38:26 AM1/4/12
to Cassette
Ah that's a nice tip. I might be able to add that to the master pages
for my old .aspx files and then I could leave it enabled for the MVC
pages.

I'm guessing that's exactly what is happening conflict wise. Gaia is
an asp.net ajax library and I'm guessing they grab the response so
they can add in all of their client side Javascript.

On Jan 3, 8:13 am, Andrew Davey <and...@equin.co.uk> wrote:
> Nice work tracking down a work-around. I'm not sure why the output
> rewriting is breaking the page. Perhaps the Gaia control is also installing
> a response filter that conflicts with Cassette's. Let me know if you see it
> happening with other controls as well.
>
> Another useful trick to know is that the following will disable rewriting
> just for the current request:
> HttpContext.Current.Items.Add("Cassette.IsHtmlRewritingEnabled", false);
> Make sure it's added before the PostRequestHandlerExecute asp.net pipeline
> step is executed e.g. on page load.
>
> Of course if you don't need rewriting at all, then leave it completely
> switched off in web.config.
>

John Welborn

unread,
Jan 4, 2012, 12:51:25 PM1/4/12
to Cassette
FYI, this worked perfectly. I was able to turn it back on in the
web.config and then in the Page_Load of all of my Master Pages I
added
HttpContext.Current.Items.Add("Cassette.IsHtmlRewritingEnabled",
false);

So I was able to disable Cassette in .aspx pages (which is fine) and
it works like a champ with the MVC pages.
Reply all
Reply to author
Forward
0 new messages