Errors generated during processing using UrlTransformer
tin-tin opened this issue · 0 comments
tin-tin commented
We are currently experiencing the following errors intermittently with RR. It happens during processing of JS and CSS files and prevents any of the requests from being reduced. We are doing a URL transformation as the site is served via HTTPS with SSL offloaded to an external device. When the app pool recycles it is back to normal again for a small period of time eventually the errors return and RR stops.
Any help would greatly be appreciated.
Key: 24a16d6e-139d-d01f-3d20-9f22893992af
First errored on: 07/03/2013 10:06:05
Last errored on: 07/03/2013 10:06:05
Number: 4
Exception #1: There were errors reducing /WebResource.axd?d=2ISJTlTccIWS9pXm6PbOF9iT9qVKvVVPpO8qIDY-kFfakaZIONcNnYdo4jogzKJpP02szMBoEPGo3-ww1u04HM_y4k41&t=634604622479085897
Exception #2: Value does not fall within the expected range.
Stack Trace#2:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Web.Util.Misc.ThrowIfFailedHr(Int32 hresult)
at System.Web.Hosting.IIS7WorkerRequest.GetServerVariableInternal(String name)
at System.Web.HttpRequest.get_Url()
at XXXX.UI.Core.FirstRequestInitialisation.GetFullyQualifiedHost(HttpContext context)
at XXXX.UI.Global.<>c__DisplayClass1.b__0(HttpContextBase cxt, String x, String y)
at RequestReduce.Utilities.UriBuilder.BuildResourceUrl(Guid key, String signature, Type resourceType)
at RequestReduce.Utilities.UriBuilder.BuildResourceUrl[T](Guid key, String signature)
at RequestReduce.Utilities.UriBuilder.BuildResourceUrl[T](Guid key, Byte[] bytes)
at RequestReduce.Reducer.HeadResourceReducerBase`1.Process(Guid key, String urls)
at RequestReduce.Module.ReducingQueue.ProcessQueuedItem()
Key: ec6bb0b8-0216-36a7-e2de-99ae27987573
First errored on: 07/03/2013 09:30:40
Last errored on: 07/03/2013 09:30:40
Number: 5
Exception #1: There were errors reducing http://site.com/css/style.css::http://site.com/css/jquery.bxslider.css::http://site.com/css/jquery-ui-1.9.2.custom.css::http://site.com/css/jquery-ui-1.9.2.custom.min.css::
Exception #2: Value does not fall within the expected range.
Stack Trace#2:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Web.Util.Misc.ThrowIfFailedHr(Int32 hresult)
at System.Web.Hosting.IIS7WorkerRequest.GetServerVariableInternal(String name)
at System.Web.HttpRequest.get_Url()
at XXXX.UI.Core.FirstRequestInitialisation.GetFullyQualifiedHost(HttpContext context)
at XXXX.UI.Global.<>c__DisplayClass1.b__0(HttpContextBase cxt, String x, String y)
at RequestReduce.Reducer.CssReducer.MakeRelativeUrlsAbsoluteAndRemoveComments(String originalCss, String parentCssUrl)
at RequestReduce.Reducer.CssReducer.ProcessCss(String url)
at RequestReduce.Reducer.CssReducer.ProcessResource(Guid key, IEnumerable`1 urls)
at RequestReduce.Reducer.HeadResourceReducerBase`1.Process(Guid key, String urls)
at RequestReduce.Module.ReducingQueue.ProcessQueuedItem()
config in use:
<RequestReduce cssProcesingDisabled="false" javascriptProcessingDisabled="false" imageSpritingDisabled="true" ipFilterList="" />
And the URL transformation code:
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (RequestReduce.Api.Registry.UrlTransformer == null)
{
HttpApplication app = (HttpApplication)sender;
HttpContext context = app.Context;
RequestReduce.Api.Registry.UrlTransformer =
(cxt, x, y) => y.Replace(FirstRequestInitialisation.GetFullyQualifiedHost(context), "").Replace(FirstRequestInitialisation.GetHostWithoutPort(context), "");
}
}