Help - exception from WebResource.axd - what does it mean?

A

Alan Silver

Hello,

I have an error logging system on one of my sites, so that if an
unexpected exception occurs, I get an e-mail sent. The e-mail includes
the name of the page on which the exception occurred, so I can track it
down.

I have been getting a lot of e-mails recently showing the source of the
exception as being WebResource.axd, and I'm not sure what's happening. I
wonder if anyone here has any ideas.

The most common exception I get is...

Exception: System.Security.Cryptography.CryptographicException

Message: Padding is invalid and cannot be removed

Source = mscorlib

Stack trace =
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer,
Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
at
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock
(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(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.Proces
sRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplic
ation.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)

Anyone any ideas what this could be, or how I work out what was going on
at the time? I don't even know which page on the site caused this, as
Request.ServerVariables["SCRIPT_NAME"] simply returns WebResource.axd,
which is a .NET resource that is used all over the place.

TIA for any help.
 
B

bruce barker \(sqlwork.com\)

if you look in the iis log, you will requests to WebResource.axd. look for
the 500 status and you have the query string.
 
A

Alan Silver

"bruce barker said:
if you look in the iis log, you will requests to WebResource.axd. look for
the 500 status and you have the query string.

I looked in there, but found query strings like...

d=FIjXXc-q6aYj-7yQasNHpg2&t=632926642503125000

which means diddly squat to me. AFAIK, WebResource.axd is a .NET thing,
and the framework generates references to it, and the query strings as
well, so I'm not sure how to read this info. I have never manually added
a reference to it, so the exception is not something I've done (directly
at least).

Thanks for the reply, any further suggestions?
Alan Silver said:
Hello,

I have an error logging system on one of my sites, so that if an
unexpected exception occurs, I get an e-mail sent. The e-mail includes the
name of the page on which the exception occurred, so I can track it down.

I have been getting a lot of e-mails recently showing the source of the
exception as being WebResource.axd, and I'm not sure what's happening. I
wonder if anyone here has any ideas.

The most common exception I get is...

Exception: System.Security.Cryptography.CryptographicException

Message: Padding is invalid and cannot be removed

Source = mscorlib

Stack trace =
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer,
Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
at
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock
(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(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.Proces
sRequest(HttpContext context)
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplic
ation.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

Anyone any ideas what this could be, or how I work out what was going on
at the time? I don't even know which page on the site caused this, as
Request.ServerVariables["SCRIPT_NAME"] simply returns WebResource.axd,
which is a .NET resource that is used all over the place.

TIA for any help.
 
L

Laurent Bugnion

Hi,

Alan said:
I looked in there, but found query strings like...

d=FIjXXc-q6aYj-7yQasNHpg2&t=632926642503125000

which means diddly squat to me. AFAIK, WebResource.axd is a .NET thing,
and the framework generates references to it, and the query strings as
well, so I'm not sure how to read this info. I have never manually added
a reference to it, so the exception is not something I've done (directly
at least).

Thanks for the reply, any further suggestions?

The webresource.axd is an ASP.NET handler which is able to extract
embedded files from a resource assembly (for example script files, CSS
files, images etc...) and to return them to the client. The advantage is
that you don't need to install multiple files together with a web
assembly or web control, but only one DLL containing all the files.

See this tutorial:
http://weblogs.asp.net/jeff/archive/2005/07/18/419842.aspx

Do you use 3rd party controls in your application? Or ATLAS? Or any
other external framework?

HTH,
Laurent
 
A

Alan Silver

The webresource.axd is an ASP.NET handler which is able to extract
embedded files from a resource assembly (for example script files, CSS
files, images etc...) and to return them to the client. The advantage
is that you don't need to install multiple files together with a web
assembly or web control, but only one DLL containing all the files.

See this tutorial:
http://weblogs.asp.net/jeff/archive/2005/07/18/419842.aspx

Do you use 3rd party controls in your application? Or ATLAS? Or any
other external framework?

Thanks for the reply, but I don't think this is the issue. This site
doesn't use any 3rd party controls, nor Atlas (or any flavour of AJAX),
no external framework, etc. It's just a straight ASP.NET site, with all
code written in plain text files (eg classes in APP_Code folder), no
DLLs at all, etc.

The site uses plenty of CSS files, images, etc, but these are all linked
normally in the rendered HTML code AFAIK. Even the CSS, which is in a
theme folder is just linked normally.

Thanks again, any other ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top