title: asp.net error: This is an invalid webresource request
body: <p>I am getting a ton of error alerts from one of my asp servers in a web farm, and all the servers have the same machine key in their web.config files.
  I've looked around here but didn't find this exact case answered.  Any suggestions would be welcome.</p>
  
  <p>thanks for considering the question!</p>
  
  <p>Here are some of the the error stacks (the query string is not from our app and could be part of something else):</p>
  
  <blockquote>
    <p>Error message: This is an invalid
    webresource request. Stack trace:<br>
    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&amp; completedSynchronously)
    Source: System.Web Method: Void
    System.Web.IHttpHandler.ProcessRequest(System.Web.HttpContext)
    Page:  QueryString: d=hAGTq1Iohid</p>
  </blockquote>
  
  <p>These may have started when the Win 2003 server was patched.  Later dot.net frameworks were installed on three other servers but not on the one throwing the errors.</p>
  
  <p>Most of the error seem related to decryption  but all servers in the same web farm now same machine key in their web config. But that has not stopped the errors.</p>
  
  <p>Seeing as well :</p>
  
  <pre><code>"Length of the data to decrypt is invalid"
  Error message: Length of the data to decrypt is invalid. Stack trace: 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.ProcessReques­t(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.I­ExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) 
  </code></pre>
  
  <p>And Also  </p>
  
  <pre><code>"Invalid length for a Base-64 char array"
  Error message: Invalid length for a Base-64 char array.
  Stack trace:    at System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length)
     at System.Web.HttpServerUtility.UrlTokenDecode(String input)
     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&amp; completedSynchronously)
  Source: mscorlib
  Method: Byte[] FromBase64CharArray(Char[], Int32, Int32)
  </code></pre>
  
  <p>And </p>
  
  <pre><code>"Invalid view state"
  Error message: Invalid viewstate.
  Stack trace:    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&amp; completedSynchronously)
  Source: System.Web
  Method: System.String DecryptString(System.String)
  </code></pre>
  
  <p>Thanks again everyone.</p>