Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help how to use Login Authentication using ASP.Net with C#

Help how to use Login Authentication using ASP.Net with C#

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasesql-serversysadmin
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srajasekhar
    wrote on last edited by
    #1

    I am developing an application using ASP.Net+C# with back-end SQL Server2000. users data table is available in SQL Server2000. how to authenticate the users who are available in SQL Server using Login Authentication control. i want to write the code only in front-end in ASP.Net using C#.net application . Also if i copy the url and paste the url in another page the home page is being getting accessed. i want to prevent the accessibility if any body paste the url by copying the url and pasting it in another internet explorer rajsekhar

    M M 2 Replies Last reply
    0
    • S srajasekhar

      I am developing an application using ASP.Net+C# with back-end SQL Server2000. users data table is available in SQL Server2000. how to authenticate the users who are available in SQL Server using Login Authentication control. i want to write the code only in front-end in ASP.Net using C#.net application . Also if i copy the url and paste the url in another page the home page is being getting accessed. i want to prevent the accessibility if any body paste the url by copying the url and pasting it in another internet explorer rajsekhar

      M Offline
      M Offline
      marky777
      wrote on last edited by
      #2

      Yo! Use session variables to store the login details of the user. And when your home page loads, check if these session variables have acceptable values, if not, redirect to login page... M :)

      1 Reply Last reply
      0
      • S srajasekhar

        I am developing an application using ASP.Net+C# with back-end SQL Server2000. users data table is available in SQL Server2000. how to authenticate the users who are available in SQL Server using Login Authentication control. i want to write the code only in front-end in ASP.Net using C#.net application . Also if i copy the url and paste the url in another page the home page is being getting accessed. i want to prevent the accessibility if any body paste the url by copying the url and pasting it in another internet explorer rajsekhar

        M Offline
        M Offline
        Michael Sync
        wrote on last edited by
        #3

        What marky777 said is right. You should use one Session variable in your basepage. You should check whether this is authenticated user or not. Since the code is written under basepage, it will automatically check the user in each and every pages' load. Some people use Cookie to handle that thing instead of Session.

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        S 1 Reply Last reply
        0
        • M Michael Sync

          What marky777 said is right. You should use one Session variable in your basepage. You should check whether this is authenticated user or not. Since the code is written under basepage, it will automatically check the user in each and every pages' load. Some people use Cookie to handle that thing instead of Session.

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

          S Offline
          S Offline
          srajasekhar
          wrote on last edited by
          #4

          kindly send a dummy project...plz..using login authentication control

          M 1 Reply Last reply
          0
          • S srajasekhar

            kindly send a dummy project...plz..using login authentication control

            M Offline
            M Offline
            Michael Sync
            wrote on last edited by
            #5

            Here is the sample. In MasterPage protected override void OnLoad(EventArgs e) { base.OnLoad(e); if( Session["UserInfo"] == null && Request.Url.AbsolutePath != "webprj/login.aspx"){ Response.Redirect("login.aspx"); } } In LogIn.aspx Session["UserInfo"] = "AuthenUsr"; act, this sol is .NET 1.1 fashion. :) i can't test 2.0 now.. for the time being, you may read this article I will reply the sol with login control in next thread...

            Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

            S 1 Reply Last reply
            0
            • M Michael Sync

              Here is the sample. In MasterPage protected override void OnLoad(EventArgs e) { base.OnLoad(e); if( Session["UserInfo"] == null && Request.Url.AbsolutePath != "webprj/login.aspx"){ Response.Redirect("login.aspx"); } } In LogIn.aspx Session["UserInfo"] = "AuthenUsr"; act, this sol is .NET 1.1 fashion. :) i can't test 2.0 now.. for the time being, you may read this article I will reply the sol with login control in next thread...

              Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

              S Offline
              S Offline
              srajasekhar
              wrote on last edited by
              #6

              Thank u...for ur message... ur program is most useful.. Also kindly suggest how to restrict the login attempts to 3 times after using the above code

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups