重寫HTTP體的讀取我想控制從POST讀取HTTP請求。主要讀取multipart/form-data
文件上傳的流,以跟蹤從客戶端收到的流。使用.net C#HTTPHandler
使用ProcessRequest
或異步BeginProcessRequest
正文已由ASP.net/IIS解析。
有沒有辦法通過HTTPHandler重寫內置讀取,還是必須使用其他機制?
非常感謝
安迪
更新 - 的要求,雖然沒有什麼不同,以多數民衆贊成實施的IHttpHandler
正常類public class MyHandler : IHttpHandler
{
public bool IsReusable { get { return true; } }
public void ProcessRequest(HttpContext context)
{
// The body has already been received by the server
// at this point.
// I need a way to access the stream being passed
// from the Client directly, before the client starts
// to actually send the Body of the Request.
}
}
編碼pleaseeeeee? – VIRA