3

I am getting an error
Error Message: The client disconnected.
Error Source: System.Web
Stack Treace: System.Web.UI.ViewStateException: Invalid viewstate ...

I have a simple web application running on windows IIS 7.5 framework 4.0. and there is no load bilancer
I am opening some pages on overlay using jquery tool of flowplayer.

Earlier I was opening the whole page with view-state on the landing page.
e.g.

$("a[rel]").length && $("a[rel]").live("click", function (a) {
        var b = $(this).overlay({
            mask: "gray",
            effect: "apple",
            closeOnClick: !1,
            closeOnEsc: !1,
            fixed: !1,
            top: 0,
            onBeforeLoad: function () {
                var a = this.getOverlay().find(".contentWrap"),
                    b = this.getOverlay().find(".contentWrap_Request"),
                    d = this.getOverlay().find(".contentWrap_AddLead");
                a.html("");
                b.html("");
                d.html("");
                a.load(this.getTrigger().attr("href"));
                b.load(this.getTrigger().attr("href"));
            }...

I thought the view state of the page which I was loading was causing the problem. So I changed the the code as follows

a.load(this.getTrigger().attr("href") + " .ajaxDiv");
b.load(this.getTrigger().attr("href") + " .ajaxDiv");

Now,I am not opening the whole page.
For avoiding the view sate of the page which I am opening on overlay I load only a pre define div of the page.

I have search over internet and found some suggestion like specifying the machine key. Which I have put in my web.config file.

 <pages enableViewStateMac="true" viewStateEncryptionMode="Always"/>
 <machineKey validationKey="...." decryptionKey="..." validation="SHA1" decryption="AES" /> 
 <authentication mode="Forms" >
        <forms requireSSL="true" protection="All" timeout="720" defaultUrl="...." loginUrl="Default.aspx" >
        </forms>
    </authentication>

But still I am getting the error above mention.

I have seen on blog suggesting Check HttpResponse.IsClientConnected in page load event Should I use this method. The traffic on my application is not too much It is around 7 to 9 thousand per day (24 hours). So can there be any reason of Application Pool Recycling.

I have also seen article of Stack Overflow but no luck.
Also I would like to add that 4 application are running in the same application pool in which my application is running.

Community
  • 1
  • 1
शेखर
  • 17,412
  • 13
  • 61
  • 117
  • see: http://stackoverflow.com/questions/809413/what-might-be-causing-thethe-client-disconnected-asp-net-exception [1]: http://stackoverflow.com/questions/809413/what-might-be-causing-thethe-client-disconnected-asp-net-exception – mcfea Feb 03 '13 at 20:53

0 Answers0