N
nsyforce
Can you add a header to a request in an http module? I'm trying
unsuccessfully. Here's an example of my code:
public void Init(HttpApplication r_objApplication)
{
r_objApplication.EndRequest += new
EventHandler(this.EndRequest)
}
protected void EndRequest(object sender, EventArgs e)
{
HttpResponse res = HttpContext.Current.Response;
res.AddHeader("MyTestHeaderVar","MyTestVarValue");
res.Output.Flush();
}
My test page then spits out all request.headers and all
request.servervariables and my header is not anywhere. Does anyone
know what I'm doing wrong?
Thanks in advance.
unsuccessfully. Here's an example of my code:
public void Init(HttpApplication r_objApplication)
{
r_objApplication.EndRequest += new
EventHandler(this.EndRequest)
}
protected void EndRequest(object sender, EventArgs e)
{
HttpResponse res = HttpContext.Current.Response;
res.AddHeader("MyTestHeaderVar","MyTestVarValue");
res.Output.Flush();
}
My test page then spits out all request.headers and all
request.servervariables and my header is not anywhere. Does anyone
know what I'm doing wrong?
Thanks in advance.