Inserting Username and Password to web browser

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

    Inserting Username and Password to web browser

    Hi,
    I made a form application with a WebBrowser that navigates to a
    certain URL. This URL is asking for a username and html before I enter
    it (a message box is shown and asks for a username and password). I
    already know the username and pass, so how can I make the application
    automatically insert them and go straightly to the URL I want?
    Please help,
    Ofir.
  • ofiras

    #2
    Re: Inserting Username and Password to web browser

    On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.c omwrote:
    Hi,
    I made a form application with a WebBrowser that navigates to a
    certain URL. This URL is asking for a username and html before I enter
    it (a message box is shown and asks for a username and password). I
    already know the username and pass, so how can I make the application
    automatically insert them and go straightly to the URL I want?
    Please help,
    Ofir.
    And how do I activate a function in the page or "press" a button in
    the page?

    Comment

    • Hillbilly

      #3
      Re: Inserting Username and Password to web browser

      You clearly are just beginning and its understandable that you do not know
      that no competent programmer will code authentication the way you are asking
      about because it is not secure.

      ASP.NET supports a Membership, Roles and Profile system that is used to do
      exactly what you probably need but not the way you are asking to get it
      done.

      Go to http://www.asp.net/learn/security/ and study -- ALL -- of the video
      tutorials.

      "ofiras" <ofiasu@gmail.c omwrote in message
      news:1feb9ee4-db36-4a23-8f90-91f4b20a30a1@p5 8g2000hsb.googl egroups.com...
      On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.c omwrote:
      Hi,
      I made a form application with a WebBrowser that navigates to a
      certain URL. This URL is asking for a username and html before I enter
      it (a message box is shown and asks for a username and password). I
      already know the username and pass, so how can I make the application
      automatically insert them and go straightly to the URL I want?
      Please help,
      Ofir.
      And how do I activate a function in the page or "press" a button in
      the page?

      Comment

      • Ralph

        #4
        Re: Inserting Username and Password to web browser

        On Oct 13, 5:37 am, ofiras <ofi...@gmail.c omwrote:
        On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.c omwrote:
        >
        Hi,
        I made a form application with a WebBrowser that navigates to a
        certain URL. This URL is asking for a username and html before I enter
        it (a message box is shown and asks for a username and password). I
        already know the username and pass, so how can I make the application
        automatically insert them and go straightly to the URL I want?
        Please help,
        Ofir.
        >
        And how do I activate a function in the page or "press" a button in
        the page?
        try the following to put a value into a textbox
        HtmlElement tb = brow.Document.G etElementById(" TextBox1");
        tb.InnerText = "QWERTY";

        try the following to click a button

        HtmlElement Button1 = brow.Document.G etElementById(" Button1");
        Button1.InvokeM ember("click");

        Comment

        • ofiras

          #5
          Re: Inserting Username and Password to web browser

          On 13 אוקטובר, 20:16, Ralph <ralph...@gmail .comwrote:
          On Oct 13, 5:37 am, ofiras <ofi...@gmail.c omwrote:
          >
          On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.c omwrote:
          >
          Hi,
          I made a form application with a WebBrowser that navigates to a
          certain URL. This URL is asking for a username and html before I enter
          it (a message box is shown and asks for a username and password). I
          already know the username and pass, so how can I make the application
          automatically insert them and go straightly to the URL I want?
          Please help,
          Ofir.
          >
          And how do I activate a function in the page or "press" a button in
          the page?
          >
          try the following to put a value into a textbox
          HtmlElement tb = brow.Document.G etElementById(" TextBox1");
                      tb.InnerText = "QWERTY";
          >
          try the following to click a button
          >
          HtmlElement Button1 = brow.Document.G etElementById(" Button1");
          Button1.InvokeM ember("click");
          Thanks.
          Question - how do I know the id of the messagebox and the textboxes in
          it?
          It looks like that:

          And about the security problem that Hillbilly stated - I use it for
          my one only, and anyway everybody knows the username and pass
          (everybody that has my kind of modem).

          Comment

          • ofiras

            #6
            Re: Inserting Username and Password to web browser

            On 14 אוקטובר, 13:45, ofiras <ofi...@gmail.c omwrote:
            On 13 אוקטובר, 20:16, Ralph <ralph...@gmail .comwrote:
            >
            >
            >
            On Oct 13, 5:37 am, ofiras <ofi...@gmail.c omwrote:
            >
            On 13 אוקטובר, 11:03, ofiras <ofi....@gmail. comwrote:
            >
            Hi,
            I made a form application with a WebBrowser that navigates to a
            certain URL. This URL is asking for a username and html before I enter
            it (a message box is shown and asks for a username and password). I
            already know the username and pass, so how can I make the application
            automatically insert them and go straightly to the URL I want?
            Please help,
            Ofir.
            >
            And how do I activate a function in the page or "press" a button in
            the page?
            >
            try the following to put a value into a textbox
            HtmlElement tb = brow.Document.G etElementById(" TextBox1");
                        tb.InnerText = "QWERTY";
            >
            try the following to click a button
            >
            HtmlElement Button1 = brow.Document.G etElementById(" Button1");
            Button1.InvokeM ember("click");
            >
            Thanks.
            Question - how do I know the id of the messagebox and the textboxes in
            it?
            It looks like that:http://img527.imageshack.us/img527/4743/loginmk2.jpg
             And about the security problem that Hillbilly stated - I use it for
            my one only, and anyway everybody knows the username and pass
            (everybody that has my kind of modem).
            Bumping the subject...
            Please help

            Comment

            • Michael J. Ryan

              #7
              Re: Inserting Username and Password to web browser

              If he want's to pre-authenticate to another site/application, you'll need to
              either adjust the other site to accept a passed in token, for lookup, or he'll
              need to actually simulate the user logging into the page in question, then
              pass any cookies to the user before redirecting to the foreign site...

              The latter is really bad form.. if it's for personal use, I'll often create a
              bookmark, like the following...

              javascript:docu ment.forms[o].elemenst['u'].value='someuse r';...forms[0].submit();

              where I populate whatever values I want... if I have a bunch of users for
              different classes in a test site, it's usually easier than the autologin
              feature. but that's another point.

              On 10/13/2008 8:24 AM, Hillbilly wrote:
              You clearly are just beginning and its understandable that you do not
              know that no competent programmer will code authentication the way you
              are asking about because it is not secure.
              >
              ASP.NET supports a Membership, Roles and Profile system that is used to
              do exactly what you probably need but not the way you are asking to get
              it done.
              >
              Go to http://www.asp.net/learn/security/ and study -- ALL -- of the
              video tutorials.
              >
              "ofiras" <ofiasu@gmail.c omwrote in message
              news:1feb9ee4-db36-4a23-8f90-91f4b20a30a1@p5 8g2000hsb.googl egroups.com...
              On 13 אוקטובר, 11:03, ofiras <ofi...@gmail.c omwrote:
              >Hi,
              >I made a form application with a WebBrowser that navigates to a
              >certain URL. This URL is asking for a username and html before I enter
              >it (a message box is shown and asks for a username and password). I
              >already know the username and pass, so how can I make the application
              >automaticall y insert them and go straightly to the URL I want?
              >Please help,
              >Ofir.
              >
              And how do I activate a function in the page or "press" a button in
              the page?

              --
              Michael J. Ryan - tracker1(at)the roughnecks(dot) net - www.theroughnecks.net
              icq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)

              .... If all else fails, immortality can always be assured by spectacular error.

              Comment

              Working...