Exception:The client disconnected. RRS feed

  • Question

  • Hi,

    I  faced this exception frequently in my application at client site. Please suggest  how i can resolve the issue? 

    An exception occurred. Exception:The client disconnected. StackTrace: 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) An exception occurred. Exception:Invalid viewstate. 

    An exception occurred. Exception:Invalid length for a Base-64 char array or string. StackTrace: at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)    at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)    at System.Convert.FromBase64String(String s)    at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)    at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose)    at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)    at System.Web.UI.HiddenFieldPageStatePersister.Load()

    Thursday, March 12, 2015 10:09 AM


  • Hi,

    [quote]An exception occurred. Exception:Invalid length for a Base-64 char array or string.[/quote]

    According to the error messages, it seems that the viewstate has become "large". You can try fixing by chunking the viewstate into multiple fields using maxPageStateFieldLength in the web.config:

    <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest

    For more information, please refer to the document:

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Pengzhen Song Tuesday, April 7, 2015 7:10 AM
    Monday, March 16, 2015 9:19 AM