This is a migrated thread and some comments may be shown as answers.

RadControls doesn't work when ViewPage applying MasterPage

5 Answers 157 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Will Huang
Top achievements
Rank 2
Will Huang asked on 11 Feb 2009, 12:00 PM
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.

5 Answers, 1 is accepted

Sort by
0
Will Huang
Top achievements
Rank 2
answered on 13 Feb 2009, 03:48 PM
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. :-)

0
lyn smith
Top achievements
Rank 1
answered on 25 Oct 2010, 04:11 PM
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?
0
Sebastian
Telerik team
answered on 26 Oct 2010, 10:04 AM
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
0
Eric
Top achievements
Rank 1
answered on 30 Aug 2012, 04:11 PM
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?
0
Tsvetina
Telerik team
answered on 04 Sep 2012, 10:02 AM
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.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Will Huang
Top achievements
Rank 2
Answers by
Will Huang
Top achievements
Rank 2
lyn smith
Top achievements
Rank 1
Sebastian
Telerik team
Eric
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or