473,394 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Invalid length for a Base-64 char array

I keep getting this error. I have scoured the web and could not find any
applicable information. It seems to have really started since I upgraded to
the 1.1 framework. Any help is appreciated.

Using:
*ASP.NET 1.1
*Single machine (no clusters)
*Simple postbacks (no postbacks to different pages)
*Using only Response.Redirect() when applicable
*The page works fine. The error appears at random occasions.
*I have not been able to repro the error on my dev machine. It happens only
on my production server.
UNHANDLED Exception:
[FormatException: Invalid length for a Base-64 char array.]
System.Convert.FromBase64String(String s)
System.Web.UI.LosFormatter.Deserialize(String input)
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()

[HttpException: Invalid_Viewstate_Client_Disconnected
Client IP: 204.231.101.39
Port: 1585
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
ViewState:
***50,369 bytes of base64 text***
Http-Referer: http://198.137.76.44/appman/ManageCustomer.aspx
Path: /appman/ManageCustomer.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()
User Name: xxxx
SessionID: jqg1cr45bvomc445vefeli45
Form Data:
__EVENTTARGET = "Customers"
__EVENTARGUMENT = ""
Thanks in advance,

Dan
Nov 19 '05 #1
5 11264
Sounds like some of the base64 encoded characters are not making it back to
the server without modification. The same problem occurs when base64
characters are used in a URL. To be used in a URL they have to be URLEncoded,
too.

Try using HTMLEncode() on the base64 data before sending it to the browser.

"danc" wrote:
I keep getting this error. I have scoured the web and could not find any
applicable information. It seems to have really started since I upgraded to
the 1.1 framework. Any help is appreciated.

Using:
*ASP.NET 1.1
*Single machine (no clusters)
*Simple postbacks (no postbacks to different pages)
*Using only Response.Redirect() when applicable
*The page works fine. The error appears at random occasions.
*I have not been able to repro the error on my dev machine. It happens only
on my production server.
UNHANDLED Exception:
[FormatException: Invalid length for a Base-64 char array.]
System.Convert.FromBase64String(String s)
System.Web.UI.LosFormatter.Deserialize(String input)
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()

[HttpException: Invalid_Viewstate_Client_Disconnected
Client IP: 204.231.101.39
Port: 1585
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
ViewState:
***50,369 bytes of base64 text***
Http-Referer: http://198.137.76.44/appman/ManageCustomer.aspx
Path: /appman/ManageCustomer.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()
User Name: xxxx
SessionID: jqg1cr45bvomc445vefeli45
Form Data:
__EVENTTARGET = "Customers"
__EVENTARGUMENT = ""
Thanks in advance,

Dan

Nov 19 '05 #2
the error is coming from the framework trying to load the __viewstate hidden
field. the common cause for this error, is the viewstate is very large, and
a proxy server is truncating it, causing the error. be sure your length of
your viewstate is under 2k.

-- bruce (sqlwork.com)

"danc" <da**@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
| I keep getting this error. I have scoured the web and could not find any
| applicable information. It seems to have really started since I upgraded
to
| the 1.1 framework. Any help is appreciated.
|
| Using:
| *ASP.NET 1.1
| *Single machine (no clusters)
| *Simple postbacks (no postbacks to different pages)
| *Using only Response.Redirect() when applicable
| *The page works fine. The error appears at random occasions.
| *I have not been able to repro the error on my dev machine. It happens
only
| on my production server.
|
|
| UNHANDLED Exception:
| [FormatException: Invalid length for a Base-64 char array.]
| System.Convert.FromBase64String(String s)
| System.Web.UI.LosFormatter.Deserialize(String input)
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
|
| [HttpException: Invalid_Viewstate_Client_Disconnected
| Client IP: 204.231.101.39
| Port: 1585
| User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
| CLR 1.1.4322)
| ViewState:
| ***50,369 bytes of base64 text***
| Http-Referer: http://198.137.76.44/appman/ManageCustomer.aspx
| Path: /appman/ManageCustomer.aspx.]
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
| System.Web.UI.Page.LoadPageViewState()
| System.Web.UI.Page.ProcessRequestMain()
|
|
| User Name: xxxx
| SessionID: jqg1cr45bvomc445vefeli45
| Form Data:
| __EVENTTARGET = "Customers"
| __EVENTARGUMENT = ""
|
|
| Thanks in advance,
|
| Dan
Nov 19 '05 #3
Bruce,

The puzzle is that things work sometime and not others, so I don't know why
there would be a length limit that takes effect only some times (the exact
same data is being transferred). The large viewstate is the result of a
DropdownList control (I will look into removing the need for viewstate) and
is definitively larger than 2K. Other pages use a DataGrid control with an
even larger viewstate and have this problem only rarely (if at all).

I wonder if "Invalid_Viewstate_Client_Disconnected" is a clue.

Any other thoughts?

Regards,

Dan
"bruce barker" wrote:
the error is coming from the framework trying to load the __viewstate hidden
field. the common cause for this error, is the viewstate is very large, and
a proxy server is truncating it, causing the error. be sure your length of
your viewstate is under 2k.

-- bruce (sqlwork.com)

"danc" <da**@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
| I keep getting this error. I have scoured the web and could not find any
| applicable information. It seems to have really started since I upgraded
to
| the 1.1 framework. Any help is appreciated.
|
| Using:
| *ASP.NET 1.1
| *Single machine (no clusters)
| *Simple postbacks (no postbacks to different pages)
| *Using only Response.Redirect() when applicable
| *The page works fine. The error appears at random occasions.
| *I have not been able to repro the error on my dev machine. It happens
only
| on my production server.
|
|
| UNHANDLED Exception:
| [FormatException: Invalid length for a Base-64 char array.]
| System.Convert.FromBase64String(String s)
| System.Web.UI.LosFormatter.Deserialize(String input)
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
|
| [HttpException: Invalid_Viewstate_Client_Disconnected
| Client IP: 204.231.101.39
| Port: 1585
| User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
| CLR 1.1.4322)
| ViewState:
| ***50,369 bytes of base64 text***
| Http-Referer: http://198.137.76.44/appman/ManageCustomer.aspx
| Path: /appman/ManageCustomer.aspx.]
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
| System.Web.UI.Page.LoadPageViewState()
| System.Web.UI.Page.ProcessRequestMain()
|
|
| User Name: xxxx
| SessionID: jqg1cr45bvomc445vefeli45
| Form Data:
| __EVENTTARGET = "Customers"
| __EVENTARGUMENT = ""
|
|
| Thanks in advance,
|
| Dan

Nov 19 '05 #4
I'm seeing this error, as well--and it seems to come from thefact that our users will do something that triggers a postback(e.g. select an item from a DropDownList), and then do somethingthat triggers another one, before the first request hasreturned. This seems to truncate the viewstate mid-request, andcause this error.

Anyone have any ideas on how to fix this?
I keep getting this error. I have scoured the web and could notfind any
applicable information. It seems to have really started since Iupgraded to
the 1.1 framework. Any help is appreciated.

Using:
*ASP.NET 1.1
*Single machine (no clusters)
*Simple postbacks (no postbacks to different pages)
*Using only Response.Redirect() when applicable
*The page works fine. The error appears at random occasions.
*I have not been able to repro the error on my dev machine. Ithappens only
on my production server.
UNHANDLED Exception:
[FormatException: Invalid length for a Base-64 char array.]
System.Convert.FromBase64String(String s)
System.Web.UI.LosFormatter.Deserialize(String input)
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()

[HttpException: Invalid_Viewstate_Client_Disconnected
Client IP: 204.231.101.39
Port: 1585
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT5.1; SV1; .NET
CLR 1.1.4322)
ViewState:
***50,369 bytes of base64 text***
Http-Referer:http://198.137.76.44/appman/ManageCustomer.aspx
Path: /appman/ManageCustomer.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()
User Name: xxxx
SessionID: jqg1cr45bvomc445vefeli45
Form Data:
__EVENTTARGET = "Customers"
__EVENTARGUMENT = ""
Thanks in advance,

Dan

User submitted from AEWNET (http://www.aewnet.com/)
Nov 19 '05 #5
nope, i don't think that is the case. i'm looking into this issue with
microsoft under thread invalid viewstate. if you can reproduce it please
send email to va******@hotmail.com subject line invalid viewstate

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"SmashHuevo" <SmashHuevo@aew_nospam.com> wrote in message
news:ul**************@TK2MSFTNGP14.phx.gbl...
I'm seeing this error, as well--and it seems to come from the fact that our
users will do something that triggers a postback (e.g. select an item from a
DropDownList), and then do something that triggers another one, before the
first request has returned. This seems to truncate the viewstate
mid-request, and cause this error.

Anyone have any ideas on how to fix this?
I keep getting this error. I have scoured the web and could not find any
applicable information. It seems to have really started since I upgraded
to
the 1.1 framework. Any help is appreciated.

Using:
*ASP.NET 1.1
*Single machine (no clusters)
*Simple postbacks (no postbacks to different pages)
*Using only Response.Redirect() when applicable
*The page works fine. The error appears at random occasions.
*I have not been able to repro the error on my dev machine. It happens
only
on my production server.
UNHANDLED Exception:
[FormatException: Invalid length for a Base-64 char array.]
System.Convert.FromBase64String(String s)
System.Web.UI.LosFormatter.Deserialize(String input)
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()

[HttpException: Invalid_Viewstate_Client_Disconnected
Client IP: 204.231.101.39
Port: 1585
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
ViewState:
***50,369 bytes of base64 text***
Http-Referer: http://198.137.76.44/appman/ManageCustomer.aspx
Path: /appman/ManageCustomer.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()
User Name: xxxx
SessionID: jqg1cr45bvomc445vefeli45
Form Data:
__EVENTTARGET = "Customers"
__EVENTARGUMENT = ""
Thanks in advance,

Dan

User submitted from AEWNET (http://www.aewnet.com/)
Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
10
by: Chet Cromer | last post by:
I am creating a set of base classes and sub classes to use throughout a program I'm developing. The base class represents a generic "lookup table" from my database that contains lists of things...
12
by: bcr07548 | last post by:
I am writing a web site that uses JavaScript to validate certain forms and I seem to be having some trouble. The site uses PHP and for one of the forms, depending on the situation, one of of the...
0
by: dba123 | last post by:
I am getting the following error when a sub domain is receiving a shared cookie: I have this in both web.config of each application. The 1.1 application does not have the decryption= value...
2
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
3
by: floppyzedolfin | last post by:
Hi there. I'm coding an encryption / decryption program. At this very moment, I think I should be pretty close from the end, but there's something blocking me on my way. There's a "Padding is...
11
by: batmanfreeze | last post by:
I am using C# in .Net 1.1, and need to access the 'Client' Property of TcpClient, so I created a derived class to do this based upon the Microsoft Sample, located at:...
1
by: banagani | last post by:
Hi All, I am facing an issue in the XmlTextWriter class in the dotnet 2.0. This is the sample code Actual XML is like this <Name>&#x8A73;&#x7D30;&#x4ED5;&#x69D8;&#x306B;</Name>
3
by: =?Utf-8?B?Vmlub2Q=?= | last post by:
Hi All, I am facing an issue in the XmlTextWriter class in the dotnet 2.0. This is the sample code Actual XML is like this <Name>詳細仕様に</Name>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.