Re: [aus-dotnet] Invalid_Viewstate_Client_Disconnected


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Grant Maw
    • Subject: Re: [aus-dotnet] Invalid_Viewstate_Client_Disconnected
    • Date: Tue, 05 Jul 2005 22:41:53 +1000

    For those interested : we have not yet worked out why these errors started occurring the day of the server move, but "Invalid_Viewstate_Client_Disconnected" seems to happen when you have a client PC where the user clicks stop, closes the browser etc while sending the viewstate back to the server. Usually happens on slow or dodgy dialup connections with large viewstate.   Note that this error is different to "Invalid_Viewstate".   Cheers   - G

     
    On 6/29/05, Grant Maw <grant.maw@xxxxxxxxx> wrote:
    Hi William   Thanks for your response. I did see that post. None of those scenarios apply. I always turn viewstate off where it is not needed so that isn't the issue either. The application, which was previously working perfectly and has not been changed, started to intermittently throwing these exceptions since the day of the server move.   I'll recheck the IIS settings on both boxes and make sure they are identical.   Thanks again   - Grant

     
    On 6/29/05, William Luu <WilliamL@xxxxxxxxxxxxxx > wrote:
    You said that all you can find on Google doesn't apply to you, did you see this post on Google Groups?   http://groups.google.com.au/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/d8f8f63763616cf0/62b49ee61ed8c4c1?q= Invalid_Viewstate_Client_Disconnected&rnum=3&hl=en#62b49ee61ed8c4c1  

    <quote>
    Invalid_Viewstate means that the viewstate the client sends to the server
    doesn't conform to what the server expects.  The viewstate contains the
    content of controls on your webpage, that is, the text in your textbox,
    the state of your checkbox, and so on.

    </quote>

    Have you checked that the settings are the same on both of the IIS servers? Have you restarted IIS?

    My guess is only part of the ViewState is being returned to the server, as opposed to the entire ViewState (I could be wrong... it could simply be corrupt), so when the ViewState is returned to the server (on postback), the server tries to use System.Convert.FromBase64String to convert the Base64String (which is the ViewState) back to some format that the server understands.

    If ViewState is not important for your ASPX page, then experiment with the Page property, EnableViewState...

    Eg (in ASPX page):

    <% @Page EnableViewState = "false" %>

    Or go around turning off ViewState for some controls that don't need to maintain viewstate (this is a more sensible approach... but see how you go!)

    There's an MSDN Magazine article by Dino Esposito on ASP.NET ViewState:
    http://msdn.microsoft.com/msdnmag/issues/03/02/CuttingEdge

    - Will

     

    -----Original Message-----
    From: Grant Maw [mailto: grant.maw@xxxxxxxxx]
    Sent: Wednesday, 29 June 2005 11:15 AM
    To: dotnet@xxxxxxxxxxx
    Subject: [aus-dotnet] Invalid_Viewstate_Client_Disconnected

    Hi All   We have recently moved an asp.net application onto a new server, with a new IP address. We have updated the DNS entries for the www host (about a 10 days ago), and in the interim (waiting for DNS to propagate) we put an IIS redirect from the old IIS box to the new.   We are getting a lot of Invalid_Viewstate_Client_Disconnected exceptions being thrown. We had never experienced these exceptions before the move to the new IIS box. They seem to happen on random aspx pages ( i.e. not the same page all the time).   Has anyone experienced this behaviour before? How can I correctly troubleshoot the cause. All references I can find in Google don't apply to us, and I cannot see anything relevant in MSDN. Might it be that somebody has the IP address of the old IIS box hardcoded into a hosts file, and therefore they are not seeing the new DNS record?   Full text of the exception is below (this was generated by our custom error handler in global.asax)  :   An error has occurred : Exception of type System.Web.HttpUnhandledException was thrown.
    Source : System.Web

    InnerException : System.Web.HttpException: Invalid_Viewstate_Client_Disconnected Client IP: x.x.x.x Port: 1360 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) ViewState: <viewstate string removed for clarity> Http-Referer: <URL deleted for clarity> Path: /<aspx filename deleted for clarity>. ---> System.FormatException: Invalid length for a Base-64 char array. at System.Convert.FromBase64String(String s) at System.Web.UI.LosFormatter.Deserialize(String input) at System.Web.UI.Page.LoadPageStateFromPersistenceMedium () --- End of inner exception stack trace --- at System.Web.UI.Page.LoadPageStateFromPersistenceMedium() at System.Web.UI.Page.LoadPageViewState() at System.Web.UI.Page.ProcessRequestMain()

    Stack Trace : at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute () at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Target Site : Boolean HandleError(System.Exception)





    (Click here for more information on the aus-dotnet mailling list)