• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

WebBrowser control question

I am making a media app that manages all my media ... but I am also building a browser on board instead of calling for default browser ... but my question is about the browser (webBrowser control)

I dont like having to sign into my sites ... can I make my browser accept cookies or somehow keep the info so I dont have to sign in each time. Like my Netflix, hulu and such like accounts?
0
vbMarkO
Asked:
vbMarkO
  • 2
  • 2
1 Solution
 
CodeCruiserCommented:
>Like my Netflix, hulu and such like accounts?

You can save and reuse cookies but the duration for which the cookie will be useful depends on the website. You can create an authentication cookie which does not expire. Then pass it along with all the subsequent requests.
0
 
regevhaCommented:
Security wise, I do not recommend to use authentication cookies that do not expire.
0
 
vbMarkOAuthor Commented:
oK, save the cookie

How do I do this ... I navigate to my site ... now how do I make it so when it opens one of my above named sites it will keep the log in info cookie so I can open it next time without logging in?

What or where would a code example be for something like this?
0
 
CodeCruiserCommented:
Here is an example

http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.cookiecontainer.aspx

When you send a HTTPWebRequest to the login page, if the login is successful, cookiecontainer will have the authentication cookie. This container can then be used with subsequent requests.
0
 
vbMarkOAuthor Commented:
Not to familiar with console applications but this code helped me a lot
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now