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 not to show the Directory list in the web browser?

how not to show the Directory list in the web browser?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
6 Posts 6 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
    Subin Alex
    wrote on last edited by
    #1

    Hi, I am a starter in asp.net. i've created a project containing a folder called "Login" with some pagesin it. When i run the project and type a page name in the browser address bar it lists all the other pages in it. I want to block it and redirect it towards a single page named Login.aspx in that folder. Plz Help.

    L M S B M 5 Replies Last reply
    0
    • S Subin Alex

      Hi, I am a starter in asp.net. i've created a project containing a folder called "Login" with some pagesin it. When i run the project and type a page name in the browser address bar it lists all the other pages in it. I want to block it and redirect it towards a single page named Login.aspx in that folder. Plz Help.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      When you type the URL in the list bar, it will list all the previously visitied pages. It cannot be blocked till you delete the history.

      1 Reply Last reply
      0
      • S Subin Alex

        Hi, I am a starter in asp.net. i've created a project containing a folder called "Login" with some pagesin it. When i run the project and type a page name in the browser address bar it lists all the other pages in it. I want to block it and redirect it towards a single page named Login.aspx in that folder. Plz Help.

        M Offline
        M Offline
        Manas Bhardwaj
        wrote on last edited by
        #3

        If I understood correctly, you want to restrict the user to access any other page until he does not go through the Login process. Right? You can use a session variable(say Session["IsValidatedUser"]) and check its value on each page load, if its not set than redirect to the login.aspx P.S. : A nice way would be to implement a class which can be used to derive all the web pages. :rose:

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        1 Reply Last reply
        0
        • S Subin Alex

          Hi, I am a starter in asp.net. i've created a project containing a folder called "Login" with some pagesin it. When i run the project and type a page name in the browser address bar it lists all the other pages in it. I want to block it and redirect it towards a single page named Login.aspx in that folder. Plz Help.

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

          Do you mean that browsing is enabled in IIS - http://blog.crowe.co.nz/archive/2006/03/18/603.aspx[^]? Do you also have default page content enabled/specified - http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/dc6eb1b4-9028-4308-9935-52b64edfad36.mspx?mfr=true[^]? Scott

          1 Reply Last reply
          0
          • S Subin Alex

            Hi, I am a starter in asp.net. i've created a project containing a folder called "Login" with some pagesin it. When i run the project and type a page name in the browser address bar it lists all the other pages in it. I want to block it and redirect it towards a single page named Login.aspx in that folder. Plz Help.

            B Offline
            B Offline
            Baran M
            wrote on last edited by
            #5

            May be you could on to "Directory browsing" Option in ISS. In web.Config you can set for making a page as default,      <authentication mode="Forms">       <forms forms="401kApp" loginUrl="/login.aspx" /> </authentication>

            1 Reply Last reply
            0
            • S Subin Alex

              Hi, I am a starter in asp.net. i've created a project containing a folder called "Login" with some pagesin it. When i run the project and type a page name in the browser address bar it lists all the other pages in it. I want to block it and redirect it towards a single page named Login.aspx in that folder. Plz Help.

              M Offline
              M Offline
              Member 3879881
              wrote on last edited by
              #6

              s baran is correct, go with web.config file

              Thanks & Regards, Member 3879881, please don't forget to vote on the post

              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