2011-06-07 25 views
0

所以我想遍歷Response.Headers自定義緩存的工作,但我得到以下錯誤,當我接觸到的東西:Response.Headers和IIS6

This operation requires IIS integrated pipeline mode 

它這個可能在IIS6中做?有沒有解決方法?

var allHeaders = HttpContext.Current.Response.Headers; 
// error thrown as soon as it's accessed 

回答

4

AFAIK不能訪問HTTP響應報頭,除非你是在集成模式下運行,因爲它們是由服務器在請求的執行的稍後階段在標準模式下運行時發送。

+0

+1 - http://msdn.microsoft.com/zh-cn/library/system.web.httpresponse.headers.aspx – keyboardP 2011-06-07 17:39:50