Keeping a website session alive in C# using WebRequest or WebBrowser control? -


i trying keep session alive using either webrequest or webbrowser control. works on websites without problem particular website logging me off after 30 mins.

what ask 1 of website page @ random interval (1-10 mins) using navigateto function in webbrowser control. websites captcha login, first ask user login, cookies , use them webrequest requests , reuse webbrowser control keep alive website (so webbrowser , webrequest clients share same cookies).

i looking ideas, maybe can me out. in advance!

usually, there's nothing can session timeouts, they're both client-side , server-side, or server-side. if you're lucky, though, site in question relies on cookie timeouts, client-side. should case, can play around httpcookie.expires.

this prevent expiring:

httpcookie cookie = ...; cookie.expires = default(datetime); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -