16,021,041 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by koenigseggccxr (Top 1 by date)
koenigseggccxr
3-Oct-12 5:56am
View
I have a requirement similar to the original poster which I am really struggling with so any help would be really appreciated. I have to pass a token (string) in a HTTP request header to a 3rd party web application. In order to set up a test environment I create 2 ASP.Net websites, 1 which is my website which will set the HTTP request header value and the other which is simulating the 3rd party web application which will receive the HTTP request header. I have successfully set the request header on my website and verified this using the code below. I then perform a Response.Redirect to the simulated 3rd party web application which also uses the code below to determine if the token request header was received. Unfortunately the token request header is never displayed on the simulated 3rd party web application. I believe that I am setting the request header correctly so I feel that the problem is either with the way that I am attempting to transfer it to the simulated 3rd party web application or perhaps the request header is being sent to the simulated 3rd party web application but the way that I am checking for it is incorrect. I will be really grateful for any help or advice on this challenge. Here is the code I referred to earlier: headers = Request.Headers; for (int i = 0; i < headers.Count; i++) { string key = headers.GetKey(i); string value = headers.Get(i); Response.Write(key + " = " + value + " "); }