I am coding a Authorisation Management Module with c#. The credentials will be extracted from the http header.
My problem is :
I only have the definition of how the http header will look like(txt file). So I need to prepare the header in the code for test, (adding keys and values to the header in default.aspx) :
Response.AppendHeader("contractualData", "03346-b0-t-vg");
Response.AppendHeader("Location", "Default.aspx");
Response.Redirect("page2.aspx");
and than when I read the header in page2.aspx pageload with
Request.Headers["contractualData"];
I cannot see the newly added keys and values.(I can see it is there in response header with IEWatch, but I cant read it with request.headers. I have also tried with Response.AddHeader or Response.Headers.Add. Same behaviour!) What should I do?
In general, how can I prepare a custom header and test my code with that header?
I found a solution. Creating a request header and posting it. The following code works :