Last post Nov 24, 2009 01:04 AM by san123
Nov 23, 2009 08:00 AM|san123|LINK
is it possible to modify request headers are redirect response to a different page.
Nov 23, 2009 08:13 AM|rtpHarry|LINK
Could you explain your situation? Do you want to redirect users to a different page? You can use Response.Redirect like:
Nov 23, 2009 10:48 AM|san123|LINK
A Response.Redirect will simply redirect the request to a different page. But what want to achieve is to add custom http headers so that the other page is able to access them.
Response.Headers.Add didnt do it for me.
Nov 23, 2009 10:52 AM|rtpHarry|LINK
I think if you use the built in response.redirect after adding headers then all headers are wiped before issuing the 302 redirect.
If you handle it all yourself it might work. In this post Vikram shows how to create a custom redirect extension method:
I would try using his 3.5 extension method and adding in the extra headers before the location header.
Nov 24, 2009 01:04 AM|san123|LINK
It seems though the headers are not preserved during a reponse redirect.
string appURL = ConfigurationManager.AppSettings["APPURL"];
Response.Status = "301 Moved permanently";
Is there a way to persist headers between requests without using handlers. What can be done is examine cookies in request and add add headers correspondingly examining the values in the cookies in each request, but is there another approach to this.
thanks in advance