Automatic login

Discussion in 'ASP .Net' started by A.M, Apr 8, 2004.

  1. A.M

    A.M Guest

    Hi,

    I have implemented forms authentication on my application, but I have to
    fill the login form every time i run the web app during debugging phases. I
    know that i can change the code to automatically login on development
    machine, but i prefer to not to have such setting in the code.

    Are there any special settings in web.config so Forms authentication login
    automatically as certain UID and PWD?


    Thanks,
    Allan
    A.M, Apr 8, 2004
    #1
    1. Advertising

  2. Hi Allan,

    From your description, you're wondering whether there is any setting in
    webconfig which can make the user auto-login when visiting a
    FormsAuthentcation based web application, yes?

    As for as I known, there seems no such setting. As my opinion, the
    FormsAuthentication's Authenticate token is stored in the user's clientside
    cookie and the serverside has no means to control the clientside cookie,
    Also when rebuild our application which make the former authentication
    cookie expired(since by default the FormsAuthenticate cookie is stored as
    non-persistent cookie) so that when we debug again, we need to reinput the
    authenticate tokens. If you do want to get rid of typing the login info
    again and again in developing time, I suggest that you either change the
    Authentication mode from "Forms" to "None" or make all the page's
    protection as allow="*" such as:
    <authorization>
    <alow users="*" />
    .....

    Otherwise, we have to make the authentication cookie as persitent cookie in
    code as you mentioned at start.
    Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
    Steven Cheng[MSFT], Apr 9, 2004
    #2
    1. Advertising

  3. Hi Allan,

    Have you had a chance to check out the suggestions in my last reply or have
    you got any further ideas on this issue? If you have anything unclear or if
    there're anything else we can help, please feel free to post here. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
    Steven Cheng[MSFT], Apr 13, 2004
    #3
  4. A.M

    A.M Guest

    Hi Steven,

    I needed to keep all security structure in code and web.config, to be able
    to test all aprts of the system.
    So i used #if DEBUG preprocessor in login page's Page_load event to login
    automatically if the application is in debug mode.

    Thanks for followup,
    Allan



    "Steven Cheng[MSFT]" <> wrote in message
    news:b0or$...
    > Hi Allan,
    >
    > Have you had a chance to check out the suggestions in my last reply or

    have
    > you got any further ideas on this issue? If you have anything unclear or

    if
    > there're anything else we can help, please feel free to post here. Thanks.
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    > Get Preview at ASP.NET whidbey
    > http://msdn.microsoft.com/asp.net/whidbey/default.aspx
    >
    >
    A.M, Apr 13, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim

    automatic site login...

    Jim, Sep 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    633
    -=Chris=-
    Sep 24, 2003
  2. Guest
    Replies:
    1
    Views:
    749
    Guest
    Jun 29, 2004
  3. hennakapoor

    Automatic login a website

    hennakapoor, Jan 19, 2005, in forum: Java
    Replies:
    6
    Views:
    21,206
    chetansehgal
    Apr 1, 2008
  4. mecak
    Replies:
    2
    Views:
    498
    mecak
    Jun 12, 2006
  5. David Smithz
    Replies:
    17
    Views:
    13,869
    mohammedsk
    Aug 28, 2006
Loading...

Share This Page