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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Security in ASP.Net

Security in ASP.Net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsecurityhelpquestion
5 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.
  • P Offline
    P Offline
    pakFari
    wrote on last edited by
    #1

    I am trying to implement security in Asp.net. I designed three pages login.aspx, WebForm1.aspx and WebForm2.aspx.. Every user should first login before accessing WebForm1.aspx and WebForm2.aspx. But my security fails when any user save the address of WebForm1.aspx and directly access it. In other word he may bypass login page. Can anyone solve this problem? thanx

    C 1 Reply Last reply
    0
    • P pakFari

      I am trying to implement security in Asp.net. I designed three pages login.aspx, WebForm1.aspx and WebForm2.aspx.. Every user should first login before accessing WebForm1.aspx and WebForm2.aspx. But my security fails when any user save the address of WebForm1.aspx and directly access it. In other word he may bypass login page. Can anyone solve this problem? thanx

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Store the login status in the session, and have every page check it and redirect to the login page if need be. I think there's actually a setting in the config file for this. Christian Graus - Microsoft MVP - C++

      P 1 Reply Last reply
      0
      • C Christian Graus

        Store the login status in the session, and have every page check it and redirect to the login page if need be. I think there's actually a setting in the config file for this. Christian Graus - Microsoft MVP - C++

        P Offline
        P Offline
        pakFari
        wrote on last edited by
        #3

        can u tell me any method that use config file to perform such a task ?

        C 1 Reply Last reply
        0
        • P pakFari

          can u tell me any method that use config file to perform such a task ?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          All the config file does is specify what the default page is, AFAIK. Certainly in our code, every page is derived from our custom base page class, which means the base class checks the user, and if they are not logged in, redirects to the default page. Christian Graus - Microsoft MVP - C++

          S 1 Reply Last reply
          0
          • C Christian Graus

            All the config file does is specify what the default page is, AFAIK. Certainly in our code, every page is derived from our custom base page class, which means the base class checks the user, and if they are not logged in, redirects to the default page. Christian Graus - Microsoft MVP - C++

            S Offline
            S Offline
            Selahattin Bostanci
            wrote on last edited by
            #5

            Why don't you use Forms authentication. Just add this code to your web config file. And it will do what you want.

            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