How to pass http headers while redirecting from one application page to another application page in asp.net/C#

Hello experts,

How to pass http headers while redirecting from one application page to another application page in asp.net/C#

Thanks,
JR
JRAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MlandaTCommented:
Ahmmm, there seems to be some kind of deep misunderstanding going on here. Response headers are sent from the server to the client and that client is usually a browser like IE, FF, Chrome etc.. Headers only make sense if the receiving party can interpret it correctly. When you are sending a Response.Redirect and also set some header like test, the browser will not forward this header to the site it is now redirecting to. If you are absolutely bent on passing some parameter to the site the browser will redirect to, you will have to pass that parameter as an URL parameter.

http://www.codeproject.com/Questions/384860/Response-redirect-with-http-headers
0
JRAuthor Commented:
Hi,
I accept, but somehow need to pass the data in the http header.

Thanks,
JR
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MlandaTCommented:
What is the purpose? Authentication?

You might have to TRY to do this in two steps:
1 - Do the call using HttpWebRequest with a Cookie Container, pass in any headers. Read cookies from the response, and inspect the http status codes from the call. If it is a 3xx (redirect), then inspect the Location header to see where you should be redirecting to.

2 - Copy the Cookie information into the Response object, and issue a Response.Redirect to the value from the Location header.
0
JRAuthor Commented:
solved myself
0
MlandaTCommented:
If you can, it would be really helpful for me (and others) if you outlined how you solved this.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.