Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Telerik & "Validation of viewstate MAC failed."

Reply
Thread Tools

Telerik & "Validation of viewstate MAC failed."

 
 
SpaceMarine
Guest
Posts: n/a
 
      04-09-2008
hello,

when my page attempts a Telerik RadGrid row insert (AJAX enabled) my
page throws this exception:

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.

....my host, www.DataPacket.net, says the site is not on a webfarm, and
that this error is due to my site exceeding the Application Pool
resource limits set for it (site is on a shared hosting environment).

can anyone confirm that this is possible? i dont know much about APs,
but i am surprised that one page w/ one RadGrid thats attempting to
insert one row via AJAX could cause my site to exceed CPU/RAM
resource.

any thoughts?


thanks!
sm =
 
Reply With Quote
 
 
 
 
Peter Bromberg [C# MVP]
Guest
Posts: n/a
 
      04-09-2008
It's possible but not that likely unless there is a whopper of a viewstate
field in the page. More likely, the RAD control is modifying the viewstate in
such a way that it fails the MAC check. You can disable this check in the
web.config. I think it's <pages enableViewStateMAC = "false" /> or something
like that.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net


"SpaceMarine" wrote:

> hello,
>
> when my page attempts a Telerik RadGrid row insert (AJAX enabled) my
> page throws this exception:
>
> 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.
>
> ....my host, www.DataPacket.net, says the site is not on a webfarm, and
> that this error is due to my site exceeding the Application Pool
> resource limits set for it (site is on a shared hosting environment).
>
> can anyone confirm that this is possible? i dont know much about APs,
> but i am surprised that one page w/ one RadGrid thats attempting to
> insert one row via AJAX could cause my site to exceed CPU/RAM
> resource.
>
> any thoughts?
>
>
> thanks!
> sm =
>

 
Reply With Quote
 
 
 
 
SpaceMarine
Guest
Posts: n/a
 
      04-09-2008
On Apr 9, 12:30*pm, Peter Bromberg [C# MVP]
<(E-Mail Removed)> wrote:
> It's possible but not that likely unless there is a whopper of a viewstate
> field in the page. More likely, the RAD control is modifying the viewstate in
> such a way that it fails the MAC check. You can disable this check in the
> web.config. I think it's <pages enableViewStateMAC = "false" /> or something
> like that.


unfortunately that property is already false -- false is the default.

i know Telerik's RadGrid is pretty spiffy and uses a large
viewstate... but how would the viewstate be connected to the App Pool
for my site? i dont usually work w/ shared sites, so im not sure.

thanks,
matt
 
Reply With Quote
 
SpaceMarine
Guest
Posts: n/a
 
      04-09-2008
On Apr 9, 3:20*pm, SpaceMarine <(E-Mail Removed)> wrote:

> i know Telerik's RadGrid is pretty spiffy and uses a large
> viewstate... but how would the viewstate be connected to the App Pool


btw i isolated the viewstate and looked at its size -- 8k. sound large
enough to jack w/ my app pool?


sm
 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      04-10-2008
viewstate is an encrypted hidden field, client code does not touch it.
the error means the server can not decrypt it. there are two causes:

1) the data was changed
2) the mac key has changed

if the mac key is not specified in the web config, it is generated at
startup. if your app pool is recycling (check the log) the key can change.

-- bruce (sqlwork.com)

SpaceMarine wrote:
> hello,
>
> when my page attempts a Telerik RadGrid row insert (AJAX enabled) my
> page throws this exception:
>
> 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.
>
> ...my host, www.DataPacket.net, says the site is not on a webfarm, and
> that this error is due to my site exceeding the Application Pool
> resource limits set for it (site is on a shared hosting environment).
>
> can anyone confirm that this is possible? i dont know much about APs,
> but i am surprised that one page w/ one RadGrid thats attempting to
> insert one row via AJAX could cause my site to exceed CPU/RAM
> resource.
>
> any thoughts?
>
>
> thanks!
> sm =

 
Reply With Quote
 
SpaceMarine
Guest
Posts: n/a
 
      04-10-2008
On Apr 9, 8:06*pm, bruce barker <(E-Mail Removed)> wrote:
> viewstate is an encrypted hidden field, client code does not touch it.
> the error means the server can not decrypt it. there are two causes:
>
> 1) the data was changed
> 2) the mac key has changed
>
> if the mac key is not specified in the web config, it is generated at
> startup. if your app pool is recycling (check the log) the key can change.


not sure why youre referencing client code... im not concerned w/
clientside code. im concerend w/ what my hosting company is telling
me: that this error is due to my site pegging its app pool; which i
find hard to believe because its a private site w/ a single user (me),
doing a single thing (using this control w/ the 8k viewstate).

they claim their servers are config'ed properly.


sm
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Telerik's Controls George Ter-Saakov ASP .Net 1 05-13-2008 08:27 PM
Anyone tried r.a.d.editor from Telerik? Or suggest another? K. Abit ASP .Net 2 03-03-2007 09:19 AM
Strange problem with Telerik R.A.D Designer control v1.6 =?Utf-8?B?Vk1J?= ASP .Net 1 04-24-2006 03:57 PM
what needed to run a Telerik.WebControls.RadTreeview =?Utf-8?B?eHVkZXV0c2No?= ASP .Net 0 04-06-2006 01:29 PM
Telerik "Error Creating Control", Virtual Directory Listing Denied Light ASP .Net 1 03-22-2006 01:11 PM



Advertisments