Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Telerik & "Validation of viewstate MAC failed."

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SpaceMarine - 09 Apr 2008 17:40 GMT
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 =
Peter Bromberg [C# MVP] - 09 Apr 2008 18:30 GMT
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

> hello,
>
[quoted text clipped - 19 lines]
> thanks!
> sm =
SpaceMarine - 09 Apr 2008 21:20 GMT
On Apr 9, 12:30 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.com> 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
SpaceMarine - 09 Apr 2008 21:38 GMT
> 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
bruce barker - 10 Apr 2008 02:06 GMT
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)

> hello,
>
[quoted text clipped - 19 lines]
> thanks!
> sm =
SpaceMarine - 10 Apr 2008 03:17 GMT
> 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:
[quoted text clipped - 4 lines]
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.