Red Gate forums :: View topic - On enabling Viewstate encodin I am getting "Invalid charect"
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Load
ANTS Load forum

On enabling Viewstate encodin I am getting "Invalid charect"

Search in ANTS Load forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
Ajay



Joined: 11 May 2006
Posts: 5
Location: Albany

PostPosted: Mon Jun 05, 2006 5:04 pm    Post subject: On enabling Viewstate encodin I am getting "Invalid charect" Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Thu Jun 08, 2006 7:23 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Ajay



Joined: 11 May 2006
Posts: 5
Location: Albany

PostPosted: Thu Jun 08, 2006 7:34 pm    Post subject: Issue Resolved Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Fri Jun 09, 2006 6:04 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group