応答を更新するために、グローバルたAuthenticateRequestとPreSendRequestHeadersイベントを使用してください:その@Fanため
public class Global : HttpApplication
{
// The AuthenticateRequest event signals that the configured authentication mechanism has authenticated the current request.
// Subscribing to the AuthenticateRequest event ensures that the request will be authenticated before processing the attached module or event handler.
public void Application_AuthenticateRequest(object sender, EventArgs e)
{
// your authenticate code
}
public void Application_PreSendRequestHeaders(object sender, EventArgs e)
{
// your add heard code
}
}
感謝を。私はそのアイデアを調査したが、間違った方法のように思えた。私は途中でヘッダーを生成するアクションフィルターを配線し、途中で応答に配置しました。現在のバージョンのASP.NETでこれを行うのは正しい方法だと思われます。 – Neil