473,324 Members | 1,678 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,324 software developers and data experts.

Strange error-(WebResource.axd) CryptographicException: Padding is invalid and cannot be removed.

Ok, I have an internal intranet website created in visual studio 2005, c#.
It was running fine for months, and then all of the sudden a few days I
started getting these errors emailed to me (I have it set up to email me
exceptions). Here is the error. I have gotten this error probably 100 times
in the last 2 days.

I have googled this error to no avail. My program is not doing any
decrypting, I am not on a web farm, I have reset the web server. The website
is internal, not on internet.

Exception Thrown

Module:
http://intranet/WebResource.axd?d=_9...67410635716438

Exception Information: System.Security.Cryptography.CryptographicExceptio n:
Padding is invalid and cannot be removed.

at System.Security.Cryptography.RijndaelManagedTransf orm.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer,
Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

at
System.Security.Cryptography.RijndaelManagedTransf orm.TransformFinalBlock(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount)

at System.Security.Cryptography.CryptoStream.FlushFin alBlock()

at System.Web.Configuration.MachineKeySection.Encrypt OrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)

at System.Web.UI.Page.DecryptString(String s)

at
System.Web.Handlers.AssemblyResourceLoader.System. Web.IHttpHandler.ProcessRequest(HttpContext
context)

at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()

at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
Jul 12 '07 #1
2 5567
WebResource.axd is a builtin handler that returns resource strings.
asp.net returns javscript and builtin images this way. to keep anyone
from reading any resource string, you pass an encrypted request args
(there is an api to generate this).

because the encryption key is regenerated at startup, a recycle can
cause this error. check the error log for recycle events.

-- bruce (sqlwork.com)

Brent K wrote:
Ok, I have an internal intranet website created in visual studio 2005, c#.
It was running fine for months, and then all of the sudden a few days I
started getting these errors emailed to me (I have it set up to email me
exceptions). Here is the error. I have gotten this error probably 100 times
in the last 2 days.

I have googled this error to no avail. My program is not doing any
decrypting, I am not on a web farm, I have reset the web server. The website
is internal, not on internet.

Exception Thrown

Module:
http://intranet/WebResource.axd?d=_9...67410635716438

Exception Information: System.Security.Cryptography.CryptographicExceptio n:
Padding is invalid and cannot be removed.

at System.Security.Cryptography.RijndaelManagedTransf orm.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer,
Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

at
System.Security.Cryptography.RijndaelManagedTransf orm.TransformFinalBlock(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount)

at System.Security.Cryptography.CryptoStream.FlushFin alBlock()

at System.Web.Configuration.MachineKeySection.Encrypt OrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)

at System.Web.UI.Page.DecryptString(String s)

at
System.Web.Handlers.AssemblyResourceLoader.System. Web.IHttpHandler.ProcessRequest(HttpContext
context)

at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()

at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)

Jul 12 '07 #2
The way to solve this issue (mandatory if on a web farm) is not to use the
"autogenerated=true" attribute in the machineKey element. Generate your own
keys and have them specified, they must be the same on every machine.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder(BETA): http://www.blogmetafinder.com

"Brent K" wrote:
Ok, I have an internal intranet website created in visual studio 2005, c#.
It was running fine for months, and then all of the sudden a few days I
started getting these errors emailed to me (I have it set up to email me
exceptions). Here is the error. I have gotten this error probably 100 times
in the last 2 days.

I have googled this error to no avail. My program is not doing any
decrypting, I am not on a web farm, I have reset the web server. The website
is internal, not on internet.

Exception Thrown

Module:
http://intranet/WebResource.axd?d=_9...67410635716438

Exception Information: System.Security.Cryptography.CryptographicExceptio n:
Padding is invalid and cannot be removed.

at System.Security.Cryptography.RijndaelManagedTransf orm.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer,
Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

at
System.Security.Cryptography.RijndaelManagedTransf orm.TransformFinalBlock(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount)

at System.Security.Cryptography.CryptoStream.FlushFin alBlock()

at System.Web.Configuration.MachineKeySection.Encrypt OrDecryptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean
useValidationSymAlgo)

at System.Web.UI.Page.DecryptString(String s)

at
System.Web.Handlers.AssemblyResourceLoader.System. Web.IHttpHandler.ProcessRequest(HttpContext
context)

at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()

at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
Jul 12 '07 #3

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

Similar topics

6
by: Eric Boutin | last post by:
Hi ! I have a strange problem with a std::ostringstream.. code : #include <sstream> /*...*/ std::ostringstream ss(); ss << "\"\"" << libpath << "\"\" \"\"" << argfilename << "\"\"...
2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
0
by: Kris Vanherck | last post by:
yesterday i started getting this strange error when i try to run my asp.net project: Compiler Error Message: CS0006: Metadata file 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net...
6
by: Gary | last post by:
I have an application that has been working just fine for a couple of years. It queries a SQL database and returns some formatted data back to the client. I have a new client, who has a larger...
5
by: Nathan Sokalski | last post by:
When I view my index.aspx page any time after the first time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize)...
5
by: Shapper | last post by:
Hello, I just upload my web site to my hosting server and when I access it I always get an error: "Redicterion limit for this URL exceeded. Unable to load the requested page" Does anyone...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
1
by: JoReiners | last post by:
Hello, I have a really strange problem. I'm unable to figure it out on my own. I parse very simple xml documents, without any check for their form. These files look very similar and are encoded...
11
by: Mike C# | last post by:
Hi all, I keep getting a strange error and can't pin it down. The message is: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's...
3
by: Shelly | last post by:
I am encountering two strange problems. First one: I get a "server misconfiguration error", but only sometimes. It occurs on the first screen that accesses the database on a submit. This error...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.