|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
Hi guys, I use YAF and i receive many Invalid viewstate and related error messages: Here is a sample error i get. I'll Appreciate any help THANKS The Error:
Code: The state information is invalid for this page and might be corrupted. [System.Web.HttpException: The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate. Client IP: 89.149.227.78 Port: 2172 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Update a; AOL 6.0; Windows 98) ViewState: /wEPDwUKMTEwNTM0NjgzMw9kFgICAw9kFgICBQ9kFgJmDw8WAh4JUmV0dXJuVXJsBSMvZm9ydW0vRGVmYXVsdC5hc3B4P2c9cG9zdHMlMjZ0PTE2OWQWBmYPFgIeBGRhdGEy7woAAQAAAP////8BAAAAAAAAAAwCAAAATlN5c3RlbS5EYXRhLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAFVN5c3RlbS5EYXRhLkRhdGFUYWJsZQMAAAAZRGF0YVRhYmxlLlJlbW90aW5nVmVyc2lvbglYbWxTY2hlbWELWG1sRGlmZkdyYW0DAQEOU3lzdGVtLlZlcnNpb24CAAAACQMAAAAGBAAAANoFPD94bWwgdmVyc2lv Referer: http://www.xxx.com/forum/Default.aspx?g=login&ReturnUrl=%252fforum%252fDefault.aspx%253fg%253dposts%252526t%253d169 Path: /forum/Default.aspx ---> System.ArgumentException: The serialized data is invalid. ---> System.Runtime.Serialization.SerializationException: Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization. at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) --- End of inner exception stack trace --- at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) 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() --- 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.HiddenFieldPageStatePersister.Load() at System.Web.UI.Page.LoadPageStateFromPersistenceMedium() at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.forum_default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\72c3ead2\1690cd3a\App_Web_drgglj-q.1.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)] at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) 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) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.forum_default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\72c3ead2\1690cd3a\App_Web_drgglj-q.1.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
|
|
|
 Rank: YAF MVP

Joined: 2/12/2005 Posts: 927 Location: Italy
|
Can you edit your post, putting all that mess in a CODE block!! Do you have EnableViewState set to off globally? .....the man in black fled across the desert..........and the gunslinger followed.....
|
|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
thanks
1. Sorry for the mess 2. I dont have EnableViewState set to off. should it be?
|
|
|
 Rank: YAF Head Dude

Joined: 10/10/2004 Posts: 3,050 Location: Honolulu, HI
|
Don't turn viewstate off... follow directions here: http://forum.yetanotherf...led-error.aspx#post12984"When you are grateful, fear disappears and abundance appears”." 
|
|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
I have tried to change the machinekey according to that topic, but i still get these errors
|
|
|
 Rank: YAF Head Dude

Joined: 10/10/2004 Posts: 3,050 Location: Honolulu, HI
|
try this: <pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" /> "When you are grateful, fear disappears and abundance appears”." 
|
|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
Well, I tried that also and still i get these errors.
I must say that I get a report about these error messages from my application when it traps them. I havent experienced myself that error when i browsed the website. However, my concern is that some of the users might have got these errors.
Any other advice? Thanks in advance
|
|
|
 Rank: YAF MVP

Joined: 2/12/2005 Posts: 927 Location: Italy
|
If this is a user problem, it may be browser related. Try to get as much info as you can from the user to replicate the problem. .....the man in black fled across the desert..........and the gunslinger followed.....
|
|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
Here are few "User Agents" strings, where this problem occurs: Code: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts) Mozilla/3.0 (compatible; WebCapture 2.0; Auto; Windows)
|
|
|
 Rank: YAF Commander

Joined: 7/6/2005 Posts: 92 Location: Germany
|
Just for my information: Does YAF actually uses the ViewState feature? I have had serveral problems in my web projects, too, so I disabled it completely (except YAF) and I'm very happy with it, because mostly I want to optimize my webs for mobile devices, too, where traffic costs money. Edit: There seems to be a problem with the quotes, too  - Sry for my english BattCursor.Net - Official homepage of that tool for vista laptops!
|
|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
I've tried that either and it didnt help. BTW, when i tried to post this reply the whole page was messy, with no icons loaded and the textbox size is something like 50*100 pixels !! (I'm using FF3.0)
|
|
|
 Rank: YAF Commander

Joined: 7/6/2005 Posts: 92 Location: Germany
|
now i'm running into this problem, too. lot of viewstate mac and viewstate validation problems user agents: Code:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Mozilla/0.91 Beta (Windows) Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; FDM) Mozilla/4.76 [en] (Windows NT 5.0; U) Opera/9.0 (Windows NT 5.1; U; en) Mozilla/4.0 (compatible; Powermarks/3.5; Windows 95/98/2000/NT) Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7) Gecko/20011221 Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.01 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.2; .NET CLR 1.1.4322; yplus 4.4.02b) Yet again, viewstate is, sad but true, one of the worst asp.net features ever! It's much better to buy a second or third web server instread using that. It is blowing up html sorce with unsecure viewstate data that even prohibits some browsers accessing the site. also it will exclude search engines that reads only the first x bytes from a web page. Most of them will end up reading useless data because viewstate is placed before page content and has usally much more than 2kb in size. I really want to disable it completely. Never trust what a browser returns, only server data is valid!By the way: of course, I have tried the above steps, except the last one jaben said. to disable encryption and validation... Nothing against you, but this is, as I think, like going online with a clean windows xp install, without patches, servicepacks, firewall and antivirus software while thinking "which hacker should attack my system?" just my 2cents - Sry for my english BattCursor.Net - Official homepage of that tool for vista laptops!
|
|
|
 Rank: YAF Commander
Joined: 9/2/2008 Posts: 106 Location: Philippines
|
This viewstate problem is causing me a lot of problems. My host informed me that my forum has crashed their server numerous times. They even informed me that they will be forced to terminate my account if not resolve
|
|
|
Rank: Member
Joined: 4/12/2007 Posts: 13
|
I still have this problem. I've tracked this issue on my website for the last 2 weeks and i've seen i get approximately 5 such errors a day. Here's the error information i recorded from the server: Code:The state information is invalid for this page and might be corrupted. [System.Web.HttpException: The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate. Client IP: XXX.XXX.XXX.XXX Port: 1352 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0 ; .NET CLR 2.0.50215; SL Commerce Client v1.0; Tablet PC 2.0 ViewState: /wEPDwUKMTEwNTM0NjgzMw9kFgICAw9kFgICBQ9kFgJmD2QWHGYPFgIeBGRhdGEy7woAAQAAAP////8BAAAAAAAAAAwCAAAATlN5c3RlbS5EYXRhLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAFVN5c3RlbS5EYXRhLkRhdGFUYWJsZQMAAAAZRGF0YVRhYmxlLlJlbW90aW5nVmVyc2lvbglYbWxTY2hlbWELWG1sRGlmZkdyYW0DAQEOU3lzdGVtLlZlcnNpb24CAAAACQMAAAAGBAAAANoFPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTE2Ij8+DQo8eHM6c2NoZW1hIHhtbG5zPSIiIHht Referer: /forum/default.aspx?g=register Path: /forum/default.aspx ---> System.ArgumentException: The serialized data is invalid. ---> System.Runtime.Serialization.SerializationException: Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization. at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) --- End of inner exception stack trace --- at System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) 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() --- 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.HiddenFieldPageStatePersister.Load() at System.Web.UI.Page.LoadPageStateFromPersistenceMedium() at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.forum_default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\72c3ead2\1690cd3a\App_Web_xtg4blm7.2.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)] at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) 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) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.forum_default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\72c3ead2\1690cd3a\App_Web_xtg4blm7.2.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) I hope that helps
|
|
|
 Rank: YAF Developer

Joined: 7/12/2005 Posts: 1,324 Location: on Dock Street
|
See other thread, check with web host to see if running as a web farm. If so add MachineKey. Well documented issues with Viewstate and Webfarm configurations. http://forum.yetanotherf...ed-error.aspx#post12984
As previously stated don't use that machine key but google a generator to find your own.  "It's a case of RTFM.. the only problem being we don't have a manual!" When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon  )
|
|
|
| Users browsing this topic |
|
Guest
|