This project has moved and is read-only. For the latest updates, please go here.

I've already login into....

Topics: Developer Forum, Project Management Forum, User Forum
Jul 29, 2009 at 2:31 PM


Im very beginner to c#, now use with satisfaction Html agility pack , but in my program i use too:

mshtml.HTMLDocument doc = (mshtml.HTMLDocument)webBrowser1.Document.DomDocument;

to login in reserved area , when i  use :

HtmlAgilityPack.HtmlDocument ParseDoc = web.Load("");

ParseDoc is on login page, but i have already login into, can i solve this issue? Need i to read cookie?

thanks and excuse me for my short experience


Aug 2, 2009 at 12:05 PM

I have no experience with MSHTML.

Do you know if MSHTML read IE's cookies automatically, or does this have to be done manually?

You can enable cookies with HtmlAgilityPack setting your HtmlWeb object's property UseCookies to true.

/// <summary>
/// Gets or Sets a value indicating if cookies will be stored.
/// </summary>
public bool UseCookies

You need to check them yourself, or create a layer that talks between IE's cookies and HtmlAgilityPack. But I now assume you manually login with Internet Explorer, before starting your application?