mshtml - autobrowsing, and authentication

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver

    #1

    mshtml - autobrowsing, and authentication

    hi - my foray into 'autobrowsing' using mshtml etc is going ok - but
    rather slow (partly) because I'm struggling to find documentation.

    anyone have any idea how to achieve authentication in an automated
    way?

    I have automatically navigated to a page in IE, automatically clicked
    a link, but am stuck when the browser challanges for credentials. I
    was hoping for a 'OnBasicAuthCha llange' event, or some
    username/password area of the MSHTML document I could set...

    I guess I *could* try navigating to url like this:
    http://user:pass@www.mysite.com - but there must be another way....

    more broadly - anyone have hints on where I might find documentation
    for this sort of stuff...

    thanks all,
    regards,
    Oliver.
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: mshtml - autobrowsing, and authentication

    Oliver,

    When you are calling the Navigate method for the WebBrowser, you can
    pass the headers for the authenication as the last parameter.

    Using MSHTML, you can use the IAuthenticate interface (defined in COM)
    to be called when you come across an authenticated resource. There is an
    example of how to do this, but it uses C. However, it shows how to do it
    overall using the appropriate interfaces, which you can then implement in
    ..NET. The article is titled "SAMPLE: Progress Uses IAuthenticate to Bind to
    Secured Web Page" and can be found at (watch for line wrap):

    http://support.microsoft.com/default...b;en-us;156905

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m



    "Oliver" <spacehopper_ma n@yahoo.com> wrote in message
    news:5818fca8.0 312030701.83734 6b@posting.goog le.com...[color=blue]
    > hi - my foray into 'autobrowsing' using mshtml etc is going ok - but
    > rather slow (partly) because I'm struggling to find documentation.
    >
    > anyone have any idea how to achieve authentication in an automated
    > way?
    >
    > I have automatically navigated to a page in IE, automatically clicked
    > a link, but am stuck when the browser challanges for credentials. I
    > was hoping for a 'OnBasicAuthCha llange' event, or some
    > username/password area of the MSHTML document I could set...
    >
    > I guess I *could* try navigating to url like this:
    > http://user:pass@www.mysite.com - but there must be another way....
    >
    > more broadly - anyone have hints on where I might find documentation
    > for this sort of stuff...
    >
    > thanks all,
    > regards,
    > Oliver.[/color]


    Comment

    Working...