Closed berniezhao closed 8 years ago
The callstack is interesting. Line 178 of Flush()
is supposed to call the original filter. Why it came back to ResponseFilter
again?
Thanks.
i18n.dll!i18n.ResponseFilter.Write(byte[] buffer, int offset, int count) Line 66 C#
i18n.dll!i18n.ResponseFilter.Flush() Line 178 C#
System.Web.dll!System.Web.HttpWriter.FilterIntegrated(bool finalFiltering, System.Web.Hosting.IIS7WorkerRequest wr) Unknown
System.Web.dll!System.Web.HttpResponse.FilterOutput() Unknown
System.Web.dll!System.Web.HttpApplication.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() Unknown
System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously) Unknown
System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error) Unknown
System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb) Unknown
System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr, System.Web.HttpContext context) Unknown
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown
System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) Unknown
[AppDomain Transition]
Solved the problem. It turns out the the filter has been configured twice thus being chained to each other.
I deployed the app to IIS but run into a NullReferenceException.
I was able to nail down to this line in
ResponseFilter.cs
file:Here the m_stagingBuffer is null.
I can't reproduce it on my local dev machine, only on the deployed server.
Any hint is appreciated!