Bug reports
Version 3.x > Bug reports > Unable to cast object of type 'System.Web.UI.PartialCachingControl' View modes: 
User avatar
Member
Member
richard.pendergast-reedbusiness.com - 10/24/2008 2:49:58 AM
   
Unable to cast object of type 'System.Web.UI.PartialCachingControl'
We are looking at caching controls using the following:
<%@ OutputCache Duration="3600" VaryByParam="None" %>

This is critical to us at this point. With control caching turned on page response times are under 1 second - without, we are looking at roughly 30-40 seconds. This is due to the way we are accessing the data and we are looking into rewriting this at the moment, but we require a fix that will enable us to continue in the meantime.

When we turn caching on we get the following error:
Unable to cast object of type 'System.Web.UI.PartialCachingControl' to type 'CMS.PortalControls.CMSAbstractWebPart'.

We have identified the source of this error but are unable to fix it as this appears to be a Kentico issue:
http://msdn.microsoft.com/en-us/library/h30h475z.aspx

Any help would be greatly appreciated as this is currently affecting our 40 Kentico websites.

Richard

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/29/2008 4:45:08 AM
   
RE:Unable to cast object of type 'System.Web.UI.PartialCachingControl'
Hi,

What are you trying to set manually, you can use in CMS Desk. Could you please try to set the page level cache in the CMS Desk -> select some document (e.g. root) -> Properties -> General -> Cache at the bottom?
Here you can find more information about the full-page cache - http://www.kentico.com/docs/devguide/caching_options.htm

I hope it will help.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
aattoumane-altima - 2/12/2013 2:02:32 PM
   
RE:Unable to cast object of type 'System.Web.UI.PartialCachingControl'
I have a Web part (ascx) in cache by the CsmDesk.
This cache is different if the user is connected or not.
Generaly, how can i have some thing like caching webpart with very by none (not changing)

thanks

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/20/2013 7:54:40 PM
   
RE:Unable to cast object of type 'System.Web.UI.PartialCachingControl'
Hi,

I'm not sure if you realize you're responding to the fairly old thread.

Anyway, could you please describe your aim in more details?
Which version of Kentico CMS are you using?

Regards,
Zdenek