473,473 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

crypographic and viewstate errors

Hi

We have been getting 2 intermitent errors in the event log detailed below.
They are occurring on a server where the web site is stopping responding
periodically and needs to be brought back up by recycling the application
pool. We have 2 servers which are hardware load balanced with sticky sessions

We are on Windows 2003 SP1 and .Net framework V2.0

1.

Event Type: Information
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1316
Date: 04/09/2006
Time: 09:31:11
User: N/A
Computer: XXX
Description:
Event code: 4009
Event message: Viewstate verification failed. Reason: The viewstate supplied
failed integrity check.
Event time: 04/09/2006 09:31:11
Event time (UTC): 04/09/2006 08:31:11
Event ID: e84653c400314318b919a69d1e918618
Event sequence: 468
Event occurrence: 3
Event detail code: 50203

2.

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 04/09/2006
Time: 10:08:51
User: N/A
Computer:XXX
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 04/09/2006 10:08:51
Event time (UTC): 04/09/2006 09:08:51
Event ID: 01c00adecca446b5ad5435a4604f6c3b
Event sequence: 1126
Event occurrence: 1
Event detail code: 0

Process information:
Process ID: 5756
Process name: w3wp.exe
Account name:
Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.

Error 2. also makes mention to the WebResource.axd file.

--
Scott
Sep 4 '06 #1
1 2578
Hello Scott,

Glad to hear from you. I've also seen your update on the previous
thread("how analyze malfunctioning asp.net application?").

As for the intermitent CryptographicException error, based on my research
here are some possible causes:

1. The ASP.NET 2.0 application is in a webfarm/load balance
environment(which involve multiple server machines) and since ASP.NET by
default use the machinekey setting to perform encryption/decryption.
Therefore, in multi-server loading balance scenario, one request could be
processed by different server(use different internal machinekey) which
result to such exception. Is this the case in your application? If so,
you can manually specify a custom machinekey for all the servers hosts your
ASP.NET application so as to ensure the encryption use the identical key on
multiple servers:

#How To: Configure MachineKey in ASP.NET 2.0
http://msdn.microsoft.com/library/en...7.asp?frame=tr
ue

2. In ASP.NET 2.0, in addition to ViewState, the webresource.axd generated
url string has identites that're encrypted using the machinekey setting.
And these encrypted values are not valid forever, it will expire and become
invalid after long time. Therefore, if a page postback after a long time,
it is posible that the embeded viewstate info or the certain
webresource.axd url become invaild which will also raise the error. This
is mostly found in some internet based web applications since there are
some users who will use some old url(expired), such as the one in google
cache to visit the certain application and will cause application raise
such validation error.

If your application is in internet environment, you can add some code in
the Application_Error event and check whether the CryptographicException is
from some particular client agents.

In addition, you can check in the Application_Error event to see whether
the exception is always occuring against some specific pages.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


Sep 5 '06 #2

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

Similar topics

4
by: Ersin Gençtürk | last post by:
Server : WEB System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: The View State is invalid for this page and might be...
1
by: Mind Dragon | last post by:
I have an ASP application that works fine locally but when it's uploaded occasionally, I get viewstate errors. Another thing is that the viewstate for that page is disabled. There are cases where I...
2
by: Janaka | last post by:
We have managed to lock down 99% of the application errors occurring in our asp.net sites. The only errors which occur on a regular basis now are viewstate errors. We have disabled viewstate on...
2
by: Max Metral | last post by:
I get sporadic viewstate errors from Macintosh browsers. I get mailed the form values when this happens, and it appears that the problem is the encoding of the POST value from the browser. ...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
5
by: Tarun Mistry | last post by:
Hi all, im attempting to use the ViewState instead of the hidden values normally used in procedural web development, however i cant seem to get anything to add into it or load correctly from it. ...
1
by: Tarun Mistry | last post by:
Hi there, is there a simple way to check if something is in the viewstate without getting null pointer errors? I.e. obviously the "exisits" method doesnt exisit, i have just put it there to...
6
by: sck10 | last post by:
Hello, I have applications that produce the following error when they have been open to long without activity. Is there any way to force a re-load of the page or go to another page if the page...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.