简体   繁体   English

ASP.Net响应筛选器与SharePoint 2010发布网站默认设置冲突

[英]ASP.Net Response Filter Clashing with SharePoint 2010 Publishing Site Defaults

I'm debugging an HttpModule with an ASP.NET response filter. 我正在调试带有ASP.NET响应筛选器的HttpModule。 This dynamically rewrites portions of rendered SharePoint WCM pages. 这将动态重写呈现的SharePoint WCM页面的某些部分。 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. 在Server 2003和Server 2008上的SP2007中均可很好地发布发布页面。但是,在Server 2008 R2 / IIS7上的SP2010 B2中无法呈现等效页面。 The following error is returned by ASP.NET: ASP.NET返回以下错误:

Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers. 缓存后替换与IIS集成管道中修改响应缓冲区的模块不兼容。 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. 管道中的本机模块已修改了与托管后缓存替换回调相关联的HTTP_DATA_CHUNK结构,或者托管过滤器已修改了响应。

This error is consistent with KB #2014472 . 该错误与KB#2014472一致。 However: 然而:

  1. Caching is disabled for anonymous & authenticated access at the site collection level 网站集级别的匿名和身份验证访问已禁用缓存
  2. There do not appear to be any Substitution controls on either the master or layout page 在主页或布局页面上似乎没有任何替代控件
  3. The IIS 7 settings are all stock default IIS 7设置都是默认的库存

This is happening eg on /pages/default.aspx. 这发生在例如/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 . 我可以通过在IIS 7中打开站点的“页面和控件”并将Buffer选项设置为False来解决此问题

UPDATE UPDATE

Here's an official "answer" from MS Dev Support on this issue. 这是MS Dev支持人员针对此问题提供的正式“答案”。

Question: 题:
What is the alternative to response filtering in ASP.NET for modifying HTML rendered by another process when: 在以下情况下,ASP.NET中用于筛选由另一个进程呈现的HTML的响应筛选的替代方法是什么:
1. The other process cannot be modified 1.其他过程无法修改
2. Post-cache substitution must be supported 2.必须支持缓存后替换

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." 到目前为止,微软没有其他选择。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM