当前位置:编程学习 > C#/ASP.NET >>

求教一个Response.Filter的问题,IIS7

实现的功能是在出口过滤关键字,采用 Response.Filter 的方式,在IIS6中运行正常,但是升级到windows2008后,发现自定义的Stream中,同样的内容输出了2次,
public override void Write(byte[] buffer, int offset, int count)
在这里方法里面记录了输出内容,

第1次
----------------------------------------
Void Write(Byte[], Int32, Int32)
Void FilterIntegrated(Boolean, System.Web.Hosting.IIS7WorkerRequest)
Void UpdateNativeResponse(Boolean)
Void Flush(Boolean)
Void Flush()
Void GetContentMain(System.Web.UI.HtmlTextWriter)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

第2次
------------------------------------------
Void Write(Byte[], Int32, Int32)
Void FilterIntegrated(Boolean, System.Web.Hosting.IIS7WorkerRequest)
Void UpdateNativeResponse(Boolean)
Void FinishRequestNotification(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext, System.Web.RequestNotificationStatus ByRef)
System.Web.RequestNotificationStatus ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
Int32 ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

这样同样的内容被过滤了2次,并且GZIP也出错了,提示无法识别的编码格式.
--------------------编程问答--------------------
引用 楼主 63715031 的回复:
实现的功能是在出口过滤关键字,采用 Response.Filter 的方式,在IIS6中运行正常,但是升级到windows2008后,发现自定义的Stream中,同样的内容输出了2次,

http://forums.iis.net/t/1174919.aspx/1
你看一下这个帖子,看起来像一样的问题。
把内容压缩给禁止了,看看行不行 --------------------编程问答-------------------- 哎,就是,但是还是没有解决办法。
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,