0
我的第一個自定義HTTP模塊,第1步 - 只是讓管道降下來。在ASP.NET MVC應用程序中,簡單的自定義HTTPModule問題
我沒有得到我的字符串在200響應,但它在304響應。任何人都可以告訴我我錯過了什麼嗎?
我的類:
namespace WebUI.Models
{
public class SimpleModule: IHttpModule
{
public void Dispose()
{
}
public void Init(HttpApplication context)
{
context.EndRequest += OnEndRequest;
}
void OnEndRequest(object sender, System.EventArgs e)
{
HttpContext.Current.Response.Write("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr");
}
}
}
這是我得到的CSS文件的請求,並有我的 「RRRRRR .... RRRR」 的結尾:
HTTP/1.1 304 Not Modified
Content-Type: text/html; charset=utf-8
Last-Modified: Sat, 20 Feb 2010 17:20:59 GMT
Accept-Ranges: bytes
ETag: "b0d1d31151b2ca1:0"
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Thu, 25 Feb 2010 22:57:31 GMT
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
但是r不會顯示在我對該頁面的html的200響應中。
感謝您的幫助, 比爾