viewstate

The state information is invalid for this page and might be corrupted

三世轮回 提交于 2019-12-23 18:45:59
问题 Hi Guys I am receiving the following error when browsing my asp.net page in internet explorer while in firefox mozilla everything works fine. I have tried different approaches as I believe there is a problem with VIEWSTATE as to - <pages enableViewStateMac="false" > - <pages enableViewState="false"> - <pages viewStateEncryptionMode="Never"> - <pages maxPageStateFieldLength="40"> but nothing seems to work. The error looks like below: Source Error: [No relevant source lines] Source File: c:

viewstate disappears on response.redirect

余生颓废 提交于 2019-12-23 17:11:08
问题 On my asp.net c# page I have two text boxes(start and end dates) with ajax CalendarExtenders. The user selects a start date and then an end date. On selecting the end date, I bind my grid as shown below; protected void calEndDate_TextChanged(object sender, EventArgs e) { BindGrid(); } In the grid I have a command button with the following code protected void gvAllRoomStatus_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Manage") { GridViewRow row =

ViewState decoding failure when client connects via multiple IP's per request

五迷三道 提交于 2019-12-23 15:44:02
问题 We have a semi-weird issue for our site. Consistently, from 1 anonymous* user the following error occurs: Exception type: System.FormatException Exception message: Invalid length for a Base-64 char array. After some investigation, it appears the user is using some form of load-balancing firewall, as the IIS logs shows the requests originating from 2 different (but successive) IP's. From what I can determine, disabling 'ViewStateMAC' should solve this issue. I am not however sure, and without

Storing Dictionary<string, string> in ASP.NET view state?

雨燕双飞 提交于 2019-12-23 10:18:26
问题 I'm trying to store a Dictionary<string, string> in the ViewState of a custom control I'm developing for ASP.NET 2.0: private Dictionary<String, String> Items { get { object d = ViewState["Items"]; return (d == null ? null : (Dictionary<String, String>)d); } set { ViewState["Items"] = value; } } Accessing it looks like this: public void UpdateData { if (this.Items == null) this.Items = new Dictionary<string, string>(); else this.Items.Clear(); //Fill the collection } When it gets set the

Maintaining viewstate of a repeater

隐身守侯 提交于 2019-12-22 05:07:25
问题 I have a problem whereby the viewstate of a repeater i.e. the controls within the repeater are not maintaing their viewstate. I have the following: Repeater 1: <asp:Repeater ID="rptImages" runat="server"> <ItemTemplate> <asp:LinkButton Text="Add" CommandName="Add" CommandArgument=<%# Eval("ID") %> runat="server" /> </ItemTemplate> </asp:Repeater> When the link button is clicked the value of the CommandArgument is stored in a hidden field on the page. Upon postback I can't get the value of the

Is it possible to decode EventValidation and ViewState in ASP.NET?

[亡魂溺海] 提交于 2019-12-21 07:56:12
问题 How to decode the ASP.NET EventValidation and ViewState? 回答1: I answered a similar question recently, Getting values from viewstate using JQuery?. Basically, by default ViewState is just Base64-encoded, so you can decode it as long as the administrator hasn't configured the site to encrypt it. Quoting from my previous answer: If you are writing the control for your own consumption and you only need to read from ViewState , you could do so, but I wouldn't recommend it unless you find a well

ASP.NET 2.0 RijndaelManaged encryption algorithm vs. FIPS

喜你入骨 提交于 2019-12-21 04:48:28
问题 I'm running into an issue with an ASP.NET 2.0 application. Our network folks just upped our security, and now I get the floowing error whenever I try to access the app: "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms." I've done a little research, and it sounds like ASP.NET uses the RijndaelManaged AES encryption algorithm to encrypt the ViewState of pages... and RijndaelManaged is on the list of algorithms that aren't FIPS compliant. We're

How to disable ViewState?

好久不见. 提交于 2019-12-20 12:29:20
问题 I'm coming into Java world from MS and ASP.NET and looking for the similar to ASP.NET component-based HTML framework in Java. After reviewing tons of links in internet it looks like JSF2 (with facelets) is best match (is this true by the way? or there are other better choices?). The problem I'm encountering during evaluation right now is correct usage of JSF's view state. My final usage scenario would be a clustered WEB server and i'm NOT going to have any session/server-stored objects and i

Optimizing ViewState

老子叫甜甜 提交于 2019-12-20 10:13:30
问题 Does anyone have any ideas or references they could point me to regarding optimizing the viewstate of my ASP .NET application? I don't want to turn it off all together, and the main goal of optimizing it is to speed up performance so I don't want to run an expensive function to recursively disable the viewstate for certain controls because that function would slow down the load time of the page which would defeat the purpose. Any ideas? 回答1: There's not a lot I can tell you except "don't put

How to reduce javax.faces.ViewState in JSF

隐身守侯 提交于 2019-12-20 09:02:04
问题 What is the best way to reduce the size of the viewstate hidden field in JSF? I have noticed that my view state is approximately 40k this goes down to the client and back to the server on every request and response espically coming to the server this is a significant slowdown for the user. My Environment JSF 1.2, MyFaces, Tomcat, Tomahawk, RichFaces 回答1: Have you tried setting the state saving to server? This should only send an id to the client, and keep the full state on the server. Simply