I am trying to get value from HTTP server in aspx page load : Request.ServerVariables("HTTP_ENTRUST_CLIENT") and getting the following error: Request is not available in this context Description: An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Request is not available in this context
what is HTTP_ENTRUST_CLINET I do not see that anywhere. What kind of data does it hold, because if I turn trace on in my ASP.Net application I don't see that Server Variable anywhere.
That could be the problem. Maybe ASP.Net doesn't pick it up for some reason. Have you tried turnning on the trace function and checking out the responses. Also is it a header or a server variable. Because they are accessed differently in ASP.Net.Request.Headers["MyHeader"]
Thanks for your reply. It is in servervariables. I finally made it work, it was something wrong with the page, when I put the code in a new blank page it worked.
None
0 Points
15 Posts
Error when trying to get variable from HTTP header
Jan 06, 2004 09:02 AM|rtdeveloper|LINK
Participant
792 Points
2233 Posts
Re: Error when trying to get variable from HTTP header
Jan 13, 2004 11:20 AM|nberardi|LINK
None
0 Points
15 Posts
Re: Error when trying to get variable from HTTP header
Jan 13, 2004 11:41 AM|rtdeveloper|LINK
Participant
792 Points
2233 Posts
Re: Error when trying to get variable from HTTP header
Jan 13, 2004 01:08 PM|nberardi|LINK
Request.Headers["MyHeader"]
None
0 Points
15 Posts
Re: Error when trying to get variable from HTTP header
Jan 13, 2004 02:35 PM|rtdeveloper|LINK