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. How to Secure my default.aspx page

How to Secure my default.aspx page

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
4 Posts 2 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.
  • E Offline
    E Offline
    Eyungwah
    wrote on last edited by
    #1

    HI: I have a website in Website1 folder that require user to Login first then directed to default.aspx page. If user try to copy "http://localhost/website1/default.aspx. How can I prevent user from copy my default.aspx onto the URL to bypass the Login.aspx page first. Thanks in advance, Eyungwah

    K 1 Reply Last reply
    0
    • E Eyungwah

      HI: I have a website in Website1 folder that require user to Login first then directed to default.aspx page. If user try to copy "http://localhost/website1/default.aspx. How can I prevent user from copy my default.aspx onto the URL to bypass the Login.aspx page first. Thanks in advance, Eyungwah

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      Turn off anonymous access and then the page will auto re-direct to your login page if you are doing forms authentication. A sample web.config is below. The deny user="?" is what will deny anonymous access. The loginUrl is what will redirect to your login page. Hope that helps. Ben

      E 1 Reply Last reply
      0
      • K kubben

        Turn off anonymous access and then the page will auto re-direct to your login page if you are doing forms authentication. A sample web.config is below. The deny user="?" is what will deny anonymous access. The loginUrl is what will redirect to your login page. Hope that helps. Ben

        E Offline
        E Offline
        Eyungwah
        wrote on last edited by
        #3

        Thanks Ben for your replied. It works but I have some other issue though. On my Login.aspx page I have a Hyperlink for PasswordRecovery.aspx page. The Link stop working. Is there an alternate solution to make this Link working in case user forgotpassword. Thanks, eyungwah

        K 1 Reply Last reply
        0
        • E Eyungwah

          Thanks Ben for your replied. It works but I have some other issue though. On my Login.aspx page I have a Hyperlink for PasswordRecovery.aspx page. The Link stop working. Is there an alternate solution to make this Link working in case user forgotpassword. Thanks, eyungwah

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          Well, I guess what you would want to do is to create a new subfolder. In that subfolder you can have another web.config that has an allow statement so that "?" Anonymous users are allowed to access pages in that subdirectory. You can also put a location section with a path in it. So it is like Do the allow authorization stuff here Hope that helps. Ben

          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