CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    1

    Handling an authentication window

    Hello,

    I am trying to navigate through pages on a website through my c# program. I am stuck at this one page in which, when I invoke a button an authentication window comes asking for a login and a password. I want to know is there anyway I could enter the details through my program so that I can navigate to the subsequent page? The button I am invoking refers to another URL which needs this authentication.

    Or alternatively is there anyway I can pass the login details in the URL and navigate to the next page?

    Thanks.

  2. #2
    Join Date
    Jul 2006
    Posts
    297

    Re: Handling an authentication window

    It's easy to "login" all you need to do is find which page you need to post to in order to login. All the login form you fill out on the page does is post that data to another page which does all the processing. Find that page and post to it with the right data. Now is the tricky part... you'll be sent a cookie which acts like your credentials this cookie is what identifies your login session and it needs to be sent back and forth on each request so that the site knows who you are.

    Posting to the login page is easy, setting up the cookies is not. Since you're not using a browser to do this its a bit more complicated but it can still be done if you take the time to figure out how it all works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured