I am having all kinds of problems with something that should be fairly straight forward and simple. I want to add a custom header using Request.AppendHeader(name,
value) then when the page is displayed be able to get the custom header. But when I try it I get an error that object not set to instance of object error. See code below. Really need help not a link to some other page which doesn't answer the question. Must have viewed 100 of them.
Here is where I append the header
Response.AppendHeader("ReserveHeader", "navyreserve.navy.mil"); Response.Redirect(sbURL.ToString());
This line throws the error on the page cited in sbURL
string Header = Request.ServerVariables["HTTP_ReserveHeader"].ToString();