More in this section

Forums / Developing with Sitefinity / Blog Archive Error

Blog Archive Error

7 posts, 0 answered
  1. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    26 Oct 2007
    Link to this post
    SiteFinity Team,

    I got following error when I tried to use blog archive control:

     Unable to cast object of type 'Telerik.Blogs.Configuration.GenericContentElement' to type 'Telerik.Blogs.IBlogProvider'.

    Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Unable to cast object of type 'Telerik.Blogs.Configuration.GenericContentElement' to type 'Telerik.Blogs.IBlogProvider'.


    Please help
    Tim
  2. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    29 Oct 2007
    Link to this post
    Hi Tim,

    Unfortunately, we were not able to reproduce this behavior. Would you please let us know about the steps you took to get the error? Do you get it every time you drop the control or only in a specific sequential order? Is there something specific about the blogs module? Have you made any changes to it? Also, it would be very helpful if you could send us the whole error along with the stack trace.

    Thanks for your cooperation in advance.

    Sincerely yours,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    29 Oct 2007
    Link to this post
    Sitefinity Team,

    What I did is to drag the blog archive into a page, then click the select blog button, that's where the error occurs.

    Following is the whole error message:

     Unable to cast object of type 'Telerik.Blogs.Configuration.GenericContentElement' to type 'Telerik.Blogs.IBlogProvider'.

    Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Unable to cast object of type 'Telerik.Blogs.Configuration.GenericContentElement' to type 'Telerik.Blogs.IBlogProvider'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [InvalidCastException: Unable to cast object of type 'Telerik.Blogs.Configuration.GenericContentElement' to type 'Telerik.Blogs.IBlogProvider'.]
       Telerik.Blogs.WebControls.BlogsSelector.CreateChildControls() +210
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +41
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

    Tim
  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    30 Oct 2007
    Link to this post
    Hi Tim,

    Could you send us your project and database to figure out the problem as we could not reproduce this locally?

    Thanks for your cooperation in advance.

    Regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    31 Oct 2007
    Link to this post
    Sitefinity Team,

    I will try it on the brand new project and see what's gonna happen.

    Tim
  6. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    01 Nov 2007
    Link to this post

    Sitefinity Team,

    I figured out what's wrong with blog archive. Because I added a provided called pets in the web.config based on your user manual. When I removed the pets provider, it works. I am just wondering if there is a way to get around with this because I do want to add different provider for blog.

    Thanks
    Tim

  7. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    02 Nov 2007
    Link to this post
    Hi Tim,

    In order to use the provider you have specified in the web.config file, you need to provide its name in the ProviderName property of the Archive control. Thus you should not get error but as you might already know from our other post, there is a problem with the Archive control. We will provide a new patch in a few days. Sorry for the inconvenience caused.

    Regards,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
7 posts, 0 answered