Concept behind ASP.NET user LOGIN application?

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Concept behind ASP.NET user LOGIN application?

    im migrating from asp to asp.net. im a bit confused about form
    authentication in ASP.NET ...

    in ASP if I wanted to create a login application I would simply query the db
    for the username and password entered in a form and if a count of 1 was
    returned i would set cookies and redirect and so on.

    I could do this in ASP.NET, but is this what is supposed to be done? because
    in my ASP.NET unleashed book I dont see any examples of a login app except
    an entire chapter on form authentication and its a little confusing.

    What is the most proper concept behind creating a login in ASP.NET?

    thanks
    omar


    omar Guest

  2. Similar Questions and Discussions

    1. Login User from Novell Login
      Hi, At present a user loggin onto our netwok enters their username and password by a Novell Login prompt. When they fire up their browser they...
    2. user and admin login on same login page
      Hello, I have a user login page which also doubles as my administrator login. Currently, my method of logging in doesnt seem to be working...
    3. Login User User Error 80040e21
      I am getting an 80040e21 error using the log in user server behavior. The complete error message is Microsoft OLE DB Provider for SQL Server...
    4. Starting a Carbon application at user login
      Hello, I have recently written some post about how to run daemons in Mac OS X. I have a Carbon application (using CarbonLib) which tracks...
    5. User changing something on a form makes asp.net take user to login page
      Hi, I have an application that displays the database table records on the web page, the user can navigate thru the contents and make changes and...
  3. #2

    Default Re: Concept behind ASP.NET user LOGIN application?

    omar wrote:
    > im migrating from asp to asp.net. im a bit confused about form
    > authentication in ASP.NET ...
    >
    > in ASP if I wanted to create a login application I would simply query
    > the db for the username and password entered in a form and if a count
    > of 1 was returned i would set cookies and redirect and so on.
    >
    > I could do this in ASP.NET, but is this what is supposed to be done?
    > because in my ASP.NET unleashed book I dont see any examples of a
    > login app except an entire chapter on form authentication and its a
    > little confusing.
    >
    > What is the most proper concept behind creating a login in ASP.NET?
    Logging in is a process that has 2 parts: authentication (who is logging
    in?)
    and authorization (what is this person allowed to do?).

    ASP.NET can take care of the authorization part with the aid of
    configuration files. The idea is to indicate in web.config who
    has which rights to a certain folder. No more code is needed.
    If the user is not yet logged in, he or she is redirected to a login
    page automatically.

    The only thing you still have to do is make the login page and do
    the authentication, but there are a few useful functions in ASP.NET
    that make it very easy, such as:
    FormsAuthentication.RedirectFromLoginPage.

    --

    Jos


    Jos Guest

  4. #3

    Default Re: Concept behind ASP.NET user LOGIN application?

    Omar,
    What u r doing also can be implemented in .net, But not many want to do
    that, What u can do is Check the DB for Login and password and set up a
    session just like the classical ASP.
    If u want an example let me know I have one.
    Regards
    Khan Imran
    "omar" <omar23@REMOVEoptonline.net> wrote in message
    news:uNc51uKSDHA.1572@TK2MSFTNGP12.phx.gbl...
    > thanks,
    > but what about when your users are stored in a database and you want to
    give
    > access to certain pages not folders necessarily.
    >
    > In asp we would create a session or cookie upon login and give access to a
    > page by seeing if the session or cookie existed. is this not really the
    > proper way in asp.net?
    >
    > thank you
    > omar
    >
    >

    Khan Imran Guest

  5. #4

    Default Re: Concept behind ASP.NET user LOGIN application?

    Hey Omar, I ran in to the same thing the first time I
    wanted to move from a classic ASP solution to ASP.NET.
    There's some really cool functionality and some decent
    examples out there. Here's one I created just to show
    some possible configuration settings in the web.config
    file:

    [url]http://www.simpleasp.net/DesktopDefault.aspx?tabid=42[/url]

    This example is using Forms based Authentication and URL
    based Authorization.

    Another good basic example is here:

    [url]http://www.15seconds.com/issue/020220.htm[/url]

    In my simple example, I put the user name and password in
    the config file. Not something I'd do in a production
    app. You can use your login page to verify the user name
    and password against a database like you are doing now in
    ASP. Once you do this, you can use the methods exposed by
    the FormsAuthentication class to set an authentication
    cookie (note that ASP.NET does all the cookie work for
    you. You don't have to write any code).

    Good luck!
    >-----Original Message-----
    >"Khan Imran" <imran1604@htmt.soft.net> wrote in message
    >news:uuyg3uOSDHA.2132@TK2MSFTNGP12.phx.gbl...
    >> Omar,
    >> What u r doing also can be implemented in .net, But
    not many want to do
    >> that, What u can do is Check the DB for Login and
    password and set up a
    >> session just like the classical ASP.
    >
    >thanks khan, when u say "What u r doing also can be
    implemented in .net, But
    >not many want to do that" are you referring to doing it
    the classical ASP
    >way, checking the db and setting sessions?
    >
    >thank you,
    >omar
    >
    >
    >.
    >
    Jim Barrett Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139