Annoying CryptographicException on WebResource.axd

Last post 07-16-2009 1:02 PM by caracho. 23 replies.

Sort Posts:

  • Annoying CryptographicException on WebResource.axd

    11-07-2005, 7:02 PM
    • Member
      243 point Member
    • RadekP
    • Member since 06-18-2002, 8:40 PM
    • Las Vegas, NV
    • Posts 49
    OK. I waited long enough, but now after going RTM with .NET 2.0 my problem still persists. I get A LOT of below exceptions daily and I have no idea what causes them. Maybe there is someone out there who could shed any light on this.
    This happens on our production server - Windows 2003 SP1 running our custom web app now compiled to RTM version .NET 2.0. If this matters - the server is not part of any web garden or web cluster.

    Thank you in advance.

    Radek

    URL : /WebResource.axd?d=kSeV1ybpS9bEq7I4MiVq5IkULXRhwAlV5Koqh_1-Ty01&t=632667140451143976

    BaseException: System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.

    at 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.ProcessRequest(HttpContext context)

    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

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

    Error Message :Padding is invalid and cannot be removed.

    Error Source :mscorlib

    Error Stack Trace : at 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.ProcessRequest(HttpContext context)

    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

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

    Error TargetSite :Int32 DecryptData(Byte[], Int32, Int32, Byte[] ByRef, Int32, System.Security.Cryptography.PaddingMode, Boolean)

  • Re: Annoying CryptographicException on WebResource.axd

    11-09-2005, 11:15 AM
    • Member
      243 point Member
    • RadekP
    • Member since 06-18-2002, 8:40 PM
    • Las Vegas, NV
    • Posts 49

    If this helps - I've noticed a regular pattern in causing this behavior. It looks like errors are generated only when the page is hit from Google's cache (HTTP_REFERER : http://64.233.161.104/search?q=cache:(...)) or combed by one the search engine crawlers (HTTP_USER_AGENT : Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp))

    Thank You for any help

    Radek

  • Re: Annoying CryptographicException on WebResource.axd

    02-13-2006, 3:44 PM
    • Member
      5 point Member
    • cc guy
    • Member since 02-13-2006, 8:43 PM
    • Posts 1

    Did you happen to resolve this? I am experiencing the exact same problem.

    Thanks.

  • Re: Annoying CryptographicException on WebResource.axd

    03-01-2006, 4:50 AM
    • Member
      65 point Member
    • fizgig
    • Member since 07-22-2002, 7:43 AM
    • Posts 15
    Can also confirm this happens when a page is viewed through google cache. Unfortunatly I do not know how to make these errors go away.

    Ward
  • Re: Annoying CryptographicException on WebResource.axd

    03-04-2006, 6:25 PM
    • Member
      267 point Member
    • mpandur
    • Member since 08-24-2005, 7:43 PM
    • Posts 69

    Hi!

    This post is exactly what I searched for but with the exception that no solution is available. Maybe some of the moderators here could help out a bit.

    I checked the log and it seems that every time the googlebot is visiting my customers website its causing this error 66.249.65.204 HTTP/1.1 Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html).

    First it would be nice to get an explanation about why it happens and what does this mean (does google is able to index the site properly?) and second I would like to find a solution, if any additional information is needed please tell me.

    The error-message I get is as shown below.

    Thanks,

    Markus

     

    http://someURL/WebResource.axd?d=D5GnL-VKKGPWg_z-yz7sIg2&t=632712132058651250

    Message
    Padding is invalid and cannot be removed.

    Source
    mscorlib

    Target site
    Int32 DecryptData(Byte[], Int32, Int32, Byte[] ByRef, Int32, System.Security.Cryptography.PaddingMode, Boolean)

    Stack trace
       at 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.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    ToString()
    System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
       at 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.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

  • Re: Annoying CryptographicException on WebResource.axd

    03-06-2006, 9:43 AM
    • Member
      267 point Member
    • mpandur
    • Member since 08-24-2005, 7:43 PM
    • Posts 69

    Hi!

    I noted that this error can also be caused through freetextbox. In my case I use freetextbox in the cms and at least if I get all the images directly from the dll then time by time it happens that the pics from the toolbar can not be loaded and for every pic not loaded this error occurs.

    I will now try to load the pics just from a folder instead of the dll. Everything said before is still valid.

    Markus

  • Re: Annoying CryptographicException on WebResource.axd

    03-06-2006, 10:20 AM
    • Member
      267 point Member
    • mpandur
    • Member since 08-24-2005, 7:43 PM
    • Posts 69

    And another cause:

    IIS-LOG:

    2006-03-06 15:07:22 W3SVC32376 USER 66.45.225.179 GET /Cms/new_website/WebResource.axd d=9VvIn5RuBhV3h2xHTDetCA2&t=632712132058651250 80 - 200.60.247.118 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+InfoPath.1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) ASP.NET_SessionId=juycn155gmf3s245j3ji0b45 http://somewebsite/Cms/new_website/Warum.aspx somewebsite 500 0 0 3316 463 3468


    This error is not just annoying, it is a problem. I causes my sessions to get lost.

    Please help out!

    Thank you,

    Markus

  • Re: Annoying CryptographicException on WebResource.axd

    03-06-2006, 10:24 AM
    • Member
      267 point Member
    • mpandur
    • Member since 08-24-2005, 7:43 PM
    • Posts 69

    The Event-Viewer-Log for the last error descriped:

    Event code: 3005

    Event message: An unhandled exception has occurred.

    Event time: 06.03.2006 10:07:22

    Event time (UTC): 06.03.2006 15:07:22

    Event ID: 2a8189a93acf4a3b954f45eb73e9106c

    Event sequence: 4

    Event occurrence: 1

    Event detail code: 0

    Application information:

    Application domain: /LM/W3SVC/32376/Root/Cms/new_website-1-127861312407923054

    Trust level: Full

    Application Virtual Path: /Cms/new_website

    Application Path: C:\Inetpub\vhosts\somewebsite\httpdocs\Cms\new_website\

    Machine name: USER

    Process information:

    Process ID: 3380

    Process name: w3wp.exe

    Account name: USERUR\IWPD_9(somewebsite)

    Exception information:

    Exception type: CryptographicException

    Exception message: Padding is invalid and cannot be removed.

    Request information:

    Request URL: http://somewebsite/Cms/new_website/WebResource.axd?d=9VvIn5RuBhV3h2xHTDetCA2&t=632712132058651250

    Request path: /Cms/new_website/WebResource.axd

    User host address: 200.60.247.118

    User:

    Is authenticated: False

    Authentication Type:

    Thread account name: USER\IWPD_9(somewebsite)

    Thread information:

    Thread ID: 1

    Thread account name: USER\IWPD_9(somewebsite)

    Is impersonating: False

    Stack trace: at 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.ProcessRequest(HttpContext context)

    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

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

    Custom event details:

    For more information, see Help and Support Center at

  • Re: Annoying CryptographicException on WebResource.axd

    03-06-2006, 2:05 PM
    • Member
      65 point Member
    • fizgig
    • Member since 07-22-2002, 7:43 AM
    • Posts 15
    I changed my robots.txt file to:

    User-agent: *
    Disallow: /*.axd$

    That should fix these errors at least from firing when google, or another spider is crawling my website. I'll let you know if it helped.



  • Re: Annoying CryptographicException on WebResource.axd

    03-08-2006, 4:26 PM
    • Member
      10 point Member
    • campkevin
    • Member since 01-10-2006, 3:24 PM
    • Posts 2
    I am also seeing this error intermittently. It shows up in the event log several times a day. I too am not running a web farm, and I am seeing this with regular user access to the pages on my site (i.e. not just with pages hit by spiders/crawlers).
     
    I see that this issue was previously reported to Microsoft (http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=17c64976-ee21-4055-9de4-992d9c59e589), but they claim it is resolved because they can't reproduce it other than in web farm scenarios. Clearly there is a problem here, as evidenced by the number of people experiencing it in non-webfarm scenarios. It would be really nice to here something further from Microsoft on this.
  • Re: Annoying CryptographicException on WebResource.axd

    03-08-2006, 5:03 PM
    • Member
      267 point Member
    • mpandur
    • Member since 08-24-2005, 7:43 PM
    • Posts 69

    An update:

    1) The lovely trick with the robots.txt file seems to work. However it would still be interesting to know if there could be any noteable effects in the google results or something like that.

    2) All the other errors (not from google) seem to be caused from an ISAPI-Filter that I have uninstalled now. I used url_rewrite from iismods.com. I don't try to say that it is the fault of this filter, maybe I did something wrong within the configuration - maybe not.

    However I haven't seen this error for around 36 hours now and that's a new record. Hopefully that helps some of you too!

    Best regards,

    Markus

  • Re: Annoying CryptographicException on WebResource.axd

    03-09-2006, 1:39 AM
    • Member
      65 point Member
    • fizgig
    • Member since 07-22-2002, 7:43 AM
    • Posts 15
    Hi Markus,

    I see it much less fortunatly. But I still get it if someone sees a page of my website through google cache. Luckely is looks like it renders ok.

    Ward
  • Re: Annoying CryptographicException on WebResource.axd

    08-14-2006, 10:26 AM
    • Member
      10 point Member
    • stvsan
    • Member since 08-14-2006, 2:14 PM
    • Posts 2

    This thread seems old but Yahoo still seems to trigger this error even though I blocked it from my robots.txt file. Didn't anyone find resolution to this?

    Thanks

  • Re: Annoying CryptographicException on WebResource.axd

    08-22-2006, 3:13 PM
    • Member
      593 point Member
    • billr578
    • Member since 01-06-2006, 8:32 PM
    • Worcester, MA
    • Posts 121
    I'm having this same issue now and I tried the robots.txt fix as well to no avail.  My site is getting hammered with these errors, and it only happens when someone goes to our offsite search page from our site.
  • Re: Annoying CryptographicException on WebResource.axd

    09-27-2006, 8:12 AM
    • Member
      50 point Member
    • efanwick
    • Member since 07-09-2002, 8:56 AM
    • Bridgeport, CT
    • Posts 10

    Has anyone found a solution for this problem yet?  I am now getting it and I also make extensive use of freetextbox, but I seem to only get it from proxy.aol.com.  I tried playing with output cache page directives but it seems to have not made a difference.  All help greatly appreciatedSmile

    TIA.

    Eric

    Eric
    Filed under: ,
Page 1 of 2 (24 items) 1 2 Next >