InternalSubStringWithChecks Exception
<p>We're getting this InternalSubStringWithChecks exception with our application's healthMonitoring. </p>

<p>This exception is like the <a href="http://forums.asp.net/t/1019434.aspx" rel="nofollow">Padding is invalid</a> and cannot be removed exception where it's being recorded and we're getting a notification email but the end user is unaware that an actual error has happened. Though we don't want our event log filled up with this rubbish! </p>

<p>The stack trace is: </p>

<pre><code>Event message: System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   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)
</code></pre>

<p>I can't find any useful info on what causes this and how to fix it via Google. Has anyone else encountered/fixed this? </p>
