Displaying Response Stream in a Browser

M

MC

Suppose I wish to do a programmatic POST. Is it possible to display
the response in a browser? I also want to keep the same session as
was made with the POST. All I can think of is to first save the
response stream to a file but I don't like that idea, partly because I
lose the session.

Thanks for any input,
Craig
 
J

Joerg Jooss

Thus wrote MC,
Suppose I wish to do a programmatic POST. Is it possible to display
the response in a browser? I also want to keep the same session as
was made with the POST. All I can think of is to first save the
response stream to a file but I don't like that idea, partly because I
lose the session.

Instead of trying to orchestrate a WebRequest and a browser instance, I'd
rather use the WebBrowser control here.

Cheers,
 
P

Patrice

I'm not sure what is the problem. You can always stream the response you get
from the request to the browser and I don't see how using a file (which you
don't need to use) ) would have something to do with sessions...

Or is this sometying you want to do in a Windows application rather than in
an ASP.NET application ?
 
M

MC

Yes, the original idea was for a Windows application, though maybe I
could do it in ASP.NET. How would that work? I'm still getting used
to ASP.NET and web programming.

Craig
 
J

Joerg Jooss

Thus wrote Joerg,
Thus wrote MC,

Instead of trying to orchestrate a WebRequest and a browser instance,
I'd rather use the WebBrowser control here.

Ouch,

didn't bother to realize that you've posted this to an ASP.NET group ;-)

In that case you can simply dump the HttpWebResponse to your page's or HttpHandler's
output stream.

Cheers,
 
P

Patrice

In a Windows application, it would be likely simpler to just use the
webbrowser control as suggested by Joerg.

In an ASP.NET application, the server side page is able to post to another
third party web server and stream directly the response from that third
party server to the browser requesting the page that does the call...

It looks like you need to clarify first what you are trying to do from a
higher level view (and especially making sure if you go for a web or a
windows application)....
 
M

MC

I'll try this, thanks.

Thus wrote Joerg,


Ouch,

didn't bother to realize that you've posted this to an ASP.NET group ;-)

In that case you can simply dump the HttpWebResponse to your page's or HttpHandler's
output stream.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top