ASP.Net Response Filter Clashing with SharePoint 2010 Publishing Site Defaults
I'm debugging an HttpModule with an ASP.NET response filter. This dynamically rewrites portions of rendered SharePoint WCM pages. The publishing pages render fine in SP2007 on both Server 2003 and Server 2008. However the equivalent pages fail to render in SP2010 B2 on Server 2008 R2 / IIS7. The following error is returned by ASP.NET:
Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers. Either a native module in the pipeline has modified an HTTP_DATA_CHUNK structure associated with a managed post cache substitution callback, or a managed filter has modified the response.
This error is consistent with KB #2014472. However:
- Caching is disabled for anonymous & authenticated access at the site collectio开发者_StackOverflow中文版n level
- There do not appear to be any Substitution controls on either the master or layout page
- The IIS 7 settings are all stock default
This is happening e.g. on /pages/default.aspx. It seems likely I'm missing something cache related...but what?
Maybe you've found a suitable solution by now, but I stumbled across this very same issue.
I was able to resolve it by opening the site's "Pages and Controls" in IIS 7 and set the Buffer option to False.
UPDATE
Here's an official "answer" from MS Dev Support on this issue.
Question:
What is the alternative to response filtering in ASP.NET for modifying HTML rendered by another process when:
1. The other process cannot be modified
2. Post-cache substitution must be supported
Answer:
"Yes, you question is clear as blue sky and this is officially claimed to be not support. As Post-cache substitution would combine certain substitution chunks to the response bytes while response filtering expects to filter the raw bytes of the response(not modified). So the previously combined substitution chunks cannot be preserved anymore.
There is not an alternative from Microsoft so far."
精彩评论