Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

Passing HTTP Headers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Purushottam Khandebharad - 11 Feb 2006 08:01 GMT
Hi all,

I need to pass HTTP Headers from onw web site to another web site as I
need to post a form on one web applications page to page on different
web site both sites are under my control,
and user credentials are to be passed from HTTP headers

I have used HTTP modules in asp.net and registerred events like
app_PreRequestHandlerExecute, begin_reuest
whenever I try to add a header in request headers collection it throws
exception as its read only

Thanks in advance
Ken Cox - Microsoft MVP - 12 Feb 2006 05:14 GMT
Wouldn't it be easier with the Webclient class? It seems to me that it
submits to a form and handles credentials at the same time.

> Hi all,
>
[quoted text clipped - 9 lines]
>
> Thanks in advance
Pune - 13 Feb 2006 10:08 GMT
Hi Ken,
I tried following option

Using "HTTPWebRequest" class we can create a request and add
request headers to that request As follows

HttpWebRequest myHttpWebRequest;

myHttpWebRequest=(HttpWebRequest)WebRequest.Create("http://Application2/Page1.aspx");

myHttpWebRequest.Headers.Add ("Key","Value");

My requirement is so that I don't want to get the response of this
page back in response stream.

I need to open this HTTP request in the browser like Response.Redirect
() does.

Problems with this approach:
i.   Can not open the request in browser like Response.Redirect ().

Can you suggest some way out
Thanks in advance
Joerg Jooss - 13 Feb 2006 19:46 GMT
Thus wrote Pune,

> Hi Ken,
> I tried following option
[quoted text clipped - 13 lines]
> I need to open this HTTP request in the browser like Response.Redirect
> () does.

Then why don't you redirect to the page directly (or after adding some parameters
to the query string)?

Cheers,
Signature

Joerg Jooss
news-reply@joergjooss.d

Purushottam Khandebharad - 15 Feb 2006 16:52 GMT
Hi Joerg,

the ans is simple security reasons wont allow me to use query string

> Thus wrote Pune,
>
[quoted text clipped - 20 lines]
>
> Cheers,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.