The state information is invalid for this page and might be corrupted hatası hk
Bu hatayı firefox haricindeki sitelerde üye ol kısmında almaktaydım henüz denemedim ama şu şeklide bir çözüm verilmiş
http://renditionprotocol.blogspot.com.tr/2007/01/state-information-is-invalid-for-this.html
When you're using ASP.NET AJAX and the user accesses your site using Firefox, the user may see an error message that says "The state information is invalid for this page and might be corrupted." This seems to be caused by Firefox's methods for saving session information in its cache. There are a couple of ways to make sure this doesn't happen, depending on how extensive you want to disable the cache. In my case, I just wanted to do it on one page, so at the top of Page_Load I added:
Response.Cache.SetNoStore();
You could also set this in the page declaration with:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="account.aspx.cs" Inherits="Main" Title="My Account" EnableViewStateMac ="false" EnableSessionState="True" EnableEventValidation ="false" ValidateRequest ="false" ViewStateEncryptionMode ="Never" %>
You could also add something like the below to Web.config:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never">
ViewStateEncryptionMode="Never"
Bir çözüm de burda var
http://odetocode.com/blogs/scott/archive/2006/03/21/asp-net-event-validation-and-invalid-callback-or-postback-argument-again.aspx
http://forums.asp.net/t/1676202.aspx
son olarak çözümü şurada buldum ve çalıştı
http://dotnetkutuphanesi.blogspot.com.tr/2013/05/70-error-500-state-information-is.html
70 | error| 500 |The state information is invalid for this page an might be corrupted ViewState hatası
Merhaba arkadaşlar belli bir zaman önce karşılaştığım bir hatadan size
bahsetmek istiyorum bir eticaret sitesinin sepetinde bazı editlemeler
yaptım ama delete butonuna tıkladığımda update panel ile ilgili bir
sıkıntı vardı ve işlemler olmuyordu ama bu gariplik işlemler chromede
olurdun firefox ta çalışmıyordu daha sonra uzun araştırmaların ardından
şan eseri viewstate ile ilgili bir sıkıntı olabileceğini düşünüp
sıkıştırma işlemi uyguladım ve sorun ortadan kalktı başlıkta yazdığım
hatayı delete butonuna tıkladığımda alıyordum bu izleme işlemini firebug
ile yapmıştım. Aşağıdaki class i sitemize ekliyoruz.
ZipState.cs
Code:
public static byte[] Compress(byte[] data)
{
MemoryStream ms = new MemoryStream();
DeflateStream stream = new DeflateStream(ms, CompressionMode.Compress);
stream.Write(data, 0, data.Length);
stream.Close();
return ms.ToArray();
}public static byte[] Decompress(byte[] data)
{
MemoryStream ms = new MemoryStream();
ms.Write(data, 0, data.Length);
ms.Position = 0;
DeflateStream stream = new DeflateStream(ms, CompressionMode.Decompress);
MemoryStream temp = new MemoryStream();
byte[] buffer=new byte[1024];
while (true)
{
int read = stream.Read(buffer, 0, buffer.Length);
if (read <= 0)
{
break;
}
else
{
temp.Write(buffer, 0, buffer.Length);
}
}
stream.Close();
return temp.ToArray();
}
tamamen düzgün çalışma garantisi yok ama bazen yanlış
sıkıştırabiliyormuş gerçi ben karşılaşmadım ama aşağıdaki kodlarıda
sitemizde ViewState ini sıkıştırmak istediğimiz sayfaya ekliyoruz.
Code:
protected override void SavePageStateToPersistenceMedium(object state)
{
LosFormatter formatter = new LosFormatter();
StringWriter writer = new StringWriter();
formatter.Serialize(writer, state);
string viewState = writer.ToString();
byte[] data = Convert.FromBase64String(viewState);
byte[] compressedData = ZipState.Compress(data);
string str = Convert.ToBase64String(compressedData);
ClientScript.RegisterHiddenField("__CompressedVIEWSTATE", str);
}
protected override object LoadPageStateFromPersistenceMedium()
{
string viewstate = Request.Form["__CompressedVIEWSTATE"];
byte[] data = Convert.FromBase64String(viewstate);
byte[] uncompressedData = ZipState.Decompress(data);
string str = Convert.ToBase64String(uncompressedData);
LosFormatter formatter = new LosFormatter();
return formatter.Deserialize(str);
}
No related post available
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="account.aspx.cs" Inherits="Main" Title="My Account" EnableViewStateMac ="false" EnableSessionState="True" EnableEventValidation ="false" ValidateRequest ="false" ViewStateEncryptionMode ="Never" %>
YanıtlaSilbu kod yardımcı oldu.Çok Teşekkürler