1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

auto login into a asp.net website

Discussion in 'ASP.NET' started by khan17, Apr 1, 2010.

  1. khan17

    khan17 New Member

    Joined:
    Apr 1, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Location:
    chennai,tamilnadu,india
    hi,
    i ve tried to auto login into an asp.net website. using javascript i can automatically log in to the 'irctc' website but the same code have not worked for the website i ve tried. it have not even fill the username and password in the required filed. it just taken me to the login page of that website. the code i ve used is

    Code:
    <script type="text/javascript">function autoLogin() {document.webservices.submit();} </script></head><a href="javascript:autoLogin()">Log me automatically in</a><BODY><form name="webservices" method=post action="zzzzzzz" target="new_window" onSubmit="window.open('', 'new_window', 'width=450,height=300,status=yes,resizable=yes,scrollbars=yes)"> <input type=hidden id=UserName name="userName" value="xxxxxx"></input> <input type=hidden id=Password name="password" value="yyyyyy"></input> </form></body>
    
    i dont know where i am wrong. pls correct me.
     
  2. alia123

    alia123 New Member

    Joined:
    Jan 8, 2016
    Messages:
    65
    Likes Received:
    3
    Trophy Points:
    0
    Hey, check this:
    Generic steps :

    -Monitor the HTTP request being made by the browser (I use Fiddler,you might also find browser built-in network tool(press F12) handy)
    -You need to look for cookies especially.
    -In short you should be able to make same HTTPRequest on each event (by event I mean first time page request ,page submit for login and etc)
     

Share This Page