我的asp.net應用程序具有母版頁,內容頁和用戶控件。「狀態信息對於此頁無效,可能已損壞」
在主母版頁中,有一個鏈接將fancybox顯示爲iframe。 iframe具有登錄頁面的表單。 iframe是一個新的主頁面,它具有登錄的內容頁面,該頁面具有用戶對登錄的控制。
當用戶點擊按鈕登錄時,服務器端檢查憑證是否正常,如果沒有,則顯示消息。所有這一切都與一個自定義驗證器。
我的問題是,當用戶第一次點擊該按鈕登錄它檢查確定,但如果憑據是不好的,用戶retypes他們,我得到在Firefox
以下錯誤Error: Sys.WebForms.PageRequestManagerServerErrorException:
Sys.WebForms.PageRequestManagerServerErrorException: the state information is invalid
for this page and might be corrupted http.../jquery-1.7.2.js
在母版我有
<%-- jQuery --%>
<script src="<%= ResolveClientUrl("~/Template/Scripts/jquery-1.7.2.js") %>"
type="text/javascript"></script>
<%-- jQueryUI --%>
<script src="<%= ResolveClientUrl("~/Template/jqueryui/js/jquery-ui-1.8.21.custom.min.js") %>"
<script type="text/javascript" src="<%= ResolveClientUrl("~/Template/Scripts/jquery.fancybox-1.4.3.min.js") %>">
</script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$("#LoginLightBox").fancybox({
width: 300,
height: 750,
scrolling: "no"
});
$("#RegistroLightbox").fancybox({
width: 300,
height: 750,
scrolling: "no"
});
});
</script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
<body id="page1">
<form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server">
</asp:ScriptManager>
<div >
<li style="display:inline"><a class="labelsTipolinks" id="LoginLightBox" href="Login.aspx?iframe=true">Login</a></li>
<li style="display:inline;color: #C53005;">|</li>
<li style="display:inline"><a class="labelsTipolinks" id="RegistroLightbox" href="RegistroUsuario.aspx?iframe=true">Registro</a></li>
在內容頁:
<%@ Register TagPrefix="uc1" TagName="Login" Src="~/Controles/Login.ascx" %>
最後的用戶控制:
<div style="margin-top: 20px">
<asp:UpdatePanel runat="server" ID="updPanelLoginIncorrecto">
<ContentTemplate>
<asp:CustomValidator ForeColor="Red" OnServerValidate="usuarioExistente_Validation"
Display="Static" Font-Size="Small" runat="server" ID="vldLogin"
ValidationGroup="grupoValidacionLoginUsuario"
Text="<%$ Resources:LocalizedText, MsjError_LoginIncorrecto%>">
</asp:CustomValidator>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnLoginLightbox" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="tableContent" style="float: right;">
<asp:Button CssClass="button" ID="btnLoginLightbox" Text="Login" runat="server" OnClick="btnLogin_Click"
ValidationGroup="grupoValidacionLoginUsuario" />
</div>
請幫助這是怎麼回事我瘋了。我已經嘗試啓用eventvalidation設置爲false,會議,response.cache.setno ...等,但沒有工作。
EDIT
其中i得到的錯誤是在jquery的1.7.2.js和是上,說jQuery.dequeue(ELEM,類型)線上的線;
EDIT 2
我最終把的fancybox作爲主內的內聯元素,但它不是我想要的解決方案。請幫幫我!!!!!
這是網頁託管一臺服務器上,或有可能是一個機會,同時張貼到不同的服務器在負載平衡環境中?如果是這樣,用於視圖狀態的加密可能會在不同的服務器上使用不同的密鑰,並導致您遇到的問題。您也可以調查web.config中的MaxPageStateFieldLength屬性。 – 2012-08-02 19:11:35
它在開發環境,所以開發的機器是服務器 – elvainch 2012-08-02 19:25:39
好吧。跳槽。這裏還有一篇KB文章指出了這個問題,也許它會有所幫助:http://support.microsoft.com/kb/323744。您可以嘗試「清理解決方案」並完成項目的重建,因爲知識庫文章中的問題可能由ASP.NET臨時文件的位置更改引發。如果某些元數據中存在任何「陳舊」信息,則可能會導致您的問題。 – 2012-08-02 19:46:48