RadControls doesn't work when ViewPage applying MasterPage

Thread is closed for posting
6 posts, 0 answers
  1. Will Huang
    Will Huang avatar
    10 posts
    Member since:
    Feb 2009

    Posted 11 Feb 2009 Link to this post

    Hi,

    I was trying to add RadControls into my ASP.NET MVC Page but failed.  Finally, I was found the reason is that when ViewPage applying any MasterPage.  The page will always get "Validation of viewstate MAC failed" error after PostBack.  See below:

    --- 

    Server Error in '/' Application.

    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    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.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    Source Error:

    Line 113:            // Tracing requires Page IDs to be unique.
    Line 114:            ID = Guid.NewGuid().ToString();
    Line 115: ProcessRequest(HttpContext.Current);Line 116:        }
    Line 117:

    Source File: D:\Projects\TEST\SystemWebMvc\Mvc\ViewPage.cs    Line: 115 

    ---

    I was tried to do any possible modification but still can't solve this problem.

    Does anyone know how to overcome this situation?

    Thanks.
  2. Will Huang
    Will Huang avatar
    10 posts
    Member since:
    Feb 2009

    Posted 13 Feb 2009 Link to this post

    I think I found the root cause of my problem.

    1. I shouldn't use the <form runat="server"> at all.

    2. I shouldn't use any ASP.NET build-in server controls to avoid this situation.

    3. I should walk-through the ASP.NET MVC forum sample application first before I try radControls in my ASP.NET MVC project. :-)

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. lyn smith
    lyn smith avatar
    5 posts
    Member since:
    Jun 2004

    Posted 25 Oct 2010 Link to this post

    Hi,

    Did you solve this problem?

    I get this error when I try to post data on mvc which uses Radeditor.

    Please can you let me know what the solution for this is?
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 26 Oct 2010 Link to this post

    Hello lyn,

    Have you considered using our MVC editor as a replacement? It is a native MVC html editor that exposes a variety of features that you can find useful.

    Best regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Eric
    Eric avatar
    12 posts
    Member since:
    Aug 2010

    Posted 30 Aug 2012 Link to this post

    I am trying to utilize an asp.net RadTreeList within an MVC application, and I am getting this error.  There is not a treelist control in your MVC controls.  How can I get the RadTreeList to work within an MVC application?
  7. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 04 Sep 2012 Link to this post

    Hi Eric,

    I am posting here my reply from the support thread that you have opened, in case anyone else is interested.

    The RadControls for ASP.NET AJAX suite is designed to work with the lifecycle of the ASP.NET AJAX Pages and are generally not supported in MVC. In rare cases you can get simple scenarios working, that would be implemented to load entirely at once. With RadTreeList, you could try calling its ExpandAllItems() method when binding it, so that it renders entirely loaded. If this does not help, the control would not work in MVC.

    In such case, you could submit a Feature Request for such control in MVC, or enquire about work around with existing controls in the MVC forums.


    All the best,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017