On enabling Viewstate encodin I am getting "Invalid charect"

AjayAjay Posts: 8
edited June 9, 2006 1:04PM in ANTS Load
In one of the posts in the forum I read inorder to resolve Viewstate issue we have to encode it before sending to the server. But on enabling the viewstate encoding i am getting the following error:

System.FormatException: Invalid character in a Base-64 string.
at System.Convert.FromBase64String(String s)
at System.Web.UI.LosFormatter.Deserialize(String input)
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()

Base Exception: System.FormatException: Invalid character in a Base-64 string.
at System.Convert.FromBase64String(String s)
at System.Web.UI.LosFormatter.Deserialize(String input)
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()

Any help or suggestions are appriciated.

Thanks & Regards
Ajay

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    What do you mean by viewstate encoding?

    I remember one case where the user's webserver used a home-made viewstate because the viewstate was quite large and they wanted to compress it. This resulted in a hidden field in the web page called __COMPRESSEDVIEWSTATE, which of course, ANTS Load can't handle automatically. If this is the case, then part of you test script would need to include a special function to parse the viewstate out of the WebClient.HttpResponse.Content into a variable and post it back to the server. I think you may be in a similar situation?
  • Hi Brian,

    Welcome back from vacation. ...

    Well I was receiving the mentioned error, when I am trying to encode the webclient.viewstate. Instead what I am doing is capturing the Viewstate from the response body and I am encoding it while adding to Postdata. It is working fine.

    Thanks & Regards
    Ajay
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Ajay,

    If that's working for you, all the best! Normally this wouldn't be necessary unless there is something 'special' about the viewstate data like I mentioned in my previous reply.
Sign In or Register to comment.