WebClient?

  • Thread starter Thread starter Martin Madreza
  • Start date Start date
M

Martin Madreza

Hello,

i searched 2days for a solution and maybe someone can help me.

Don't know which class I should use for a WebRequest where I can hold
the connection like in the InternetExplorer.

I connect to http://www.mypage.com:7070/main?name=myname&pass=mypass

with HttpWebResponse and GetResponse or with a WebClient. Both ways
deliver me the right page. I'm logged in!

Now I want to get the http://www.mypage.com:7070/topframe page but I'm
no longer logged in. How can I hold the connection? I tried with
System.Web.HttpContext, WebClient or
http://www.mypage.com:7070/topframe?name=myname&pass=mypass and
searched the hole Web for information...

how does the IE handel this? i hope some on got an idea or know where
i can find informations.

MM
 
I connect to http://www.mypage.com:7070/main?name=myname&pass=mypass
with HttpWebResponse and GetResponse or with a WebClient. Both ways
deliver me the right page. I'm logged in!

Now I want to get the http://www.mypage.com:7070/topframe page but
I'm no longer logged in. How can I hold the connection?

Hi, Martin.

HTTP is a "stateless" protocol. One way to implement stateful connections
is to use cookies. IE receives a cookie when you log in, look for it in the
response cookie collection, and sends it on every request following. This is
the cookie you need to add to your request when you get the other pages.

Hope that helps,
-JG
 
HTTP is a stateless protocoil. There is nothing you can do to "hold"
the connection, to persist a log-in you have a few options the most
popular for websites and extranet applications is to use browser
Cookies. If the application will exist on an internal network you can
use Windows Integrated Security at the web server level.
 
Back
Top