ebdrup
  •  ebdrup
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
2009-08-26T03:46:18Z
verything is fine, configs are fine, and working nice, But all comes a sudden, it results redirection loop in this URL

/default.aspx?g=info&i=7

I get this erro, just loading the default.aspx page, and now the transaction log for the database is full.

This is the error in the event log:

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. ---> System.Web.UI.ViewStateException: Invalid viewstate.
Client IP: 194.8.74.47
Port: 1435
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MRA 4.3 (build 0121; .NET CLR 1.1.4322)
ViewState: /wEPDwUKMTg5MzM5OTQ0OQ9kFgICBQ9kFgICAQ9kFgICAg9kFgZmD2QWAmYPZBYCAgEPZBYEZg9kFgJmDw8WAh4EVGV4dAUMTm90aWZpY2F0aW9uZGQCAg9kFgRmDw8WBB8ABQJPSx4NT25DbGllbnRDbGljawUyJGZpbmQoJ0ZvcnVtUGFnZUVycm9yUG9wdXAnKS5oaWRlKCk7IHJldHVybiBmYWxzZTtkZAIBDw8WAh8ABQZDYW5jZWwWAh4Fc3R5bGUFDGRpc3BsYXk6bm9uZWQCAQ8WAh4KUGFnZUxpbmtEVDLtCwABAAAA/////wEAAAAAAAAADAIAAABOU3lzdGVtLkRhdGEsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5
Referer: http://forum.obsurvey.co...turnUrl=%2fdefault.aspx 
Path: /default.aspx ---> System.Web.HttpException: Unable to validate data.
at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

But as far as I can see there is nothing written to the event log when the error occurs. I tried looking at the event log, and then caused the error and looked at the event log again, seems nothing was written.

I tried editing default.aspx to not have the
<YAF:Forum runat="server" ID="forum"></YAF:Forum>
Tag.

The redirect problem persists even when the forum is removed from default.aspx.
So the error must be in some kind of processor or handle
Sponsor
herman_herman
2009-08-26T11:27:23Z
Hi
Do you run you app inside a webfarm or just a single server?

If it is a single server there are couple of workarounds for this issue:

1=add the following string inside system.web tag in web.config
Quote:

<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />


This has a side effect if security is important because requests are not validated.

2=add you own machinekey to the web.config so there will be no conflict.You can create valid machine keys through this website: Machinekey Generator 

this  also may help.

Regards
ebdrup
  •  ebdrup
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
2009-08-26T14:24:31Z
I have already tried what you suggest, it didn't help. But as I write I don't think the error in the log is the error causing the infinite redirection loop. Nothing seems to be written to the log when the error occurs.
And even if i remove the forum tag entirely from default.aspx, the problem persists.
Also the error occurs the first time I enter the forum and load default.aspx, that could never cause the error in the log, that has to be a submit of a page generated by the forum.

The error must be somewhere in a httphandler or something like that, as far as I can see.
figgles
2009-09-26T12:39:47Z
I have an identical issue with our forum

Single server, and the forum is DOA until this is fixed, I tried the updating the system.web / pages but that halted the entire web site. I have no idea how to add a machine key.

BTW: Preview at this YAF.net site appears to be broken.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved