Deny Access To A Page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gene

    Deny Access To A Page

    What are some ways I can deny access to an aspx page other than removing it
    altogether from the site? I need the ability to temporarily prevent all
    users from accessing certain pages.

    Thanks.


  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Deny Access To A Page

    Set up a <location> region in your web.config for each of those pages and
    set authentication to where all users are denied.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    *************** *************** *************** *************** **********
    Think Outside the Box!
    *************** *************** *************** *************** **********
    "Gene" <MrWilder@jw.co m> wrote in message
    news:%23jn3DWiJ EHA.1220@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > What are some ways I can deny access to an aspx page other than removing[/color]
    it[color=blue]
    > altogether from the site? I need the ability to temporarily prevent all
    > users from accessing certain pages.
    >
    > Thanks.
    >
    >[/color]


    Comment

    • Peter O'Reilly

      #3
      Re: Deny Access To A Page

      Set a database or session state derived flag and have those pages check the
      flag in the Page_Load event. Redirect to another page as necessary.

      --
      Peter O'Reilly


      Comment

      • Gene

        #4
        Re: Deny Access To A Page

        Sounds like a great option. Suppose I make only one change to Web.config
        (add a page to the <location> region): would the only effect be that any
        subseqeunt requests for the page are denied? Are existing sessions left
        intact?





        "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld @comcast.netNoS pamM> wrote in
        message news:%23a5DBdiJ EHA.2556@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > Set up a <location> region in your web.config for each of those pages and
        > set authentication to where all users are denied.
        >
        > --
        > Gregory A. Beamer
        > MVP; MCP: +I, SE, SD, DBA
        >
        > *************** *************** *************** *************** **********
        > Think Outside the Box!
        > *************** *************** *************** *************** **********
        > "Gene" <MrWilder@jw.co m> wrote in message
        > news:%23jn3DWiJ EHA.1220@TK2MSF TNGP11.phx.gbl. ..[color=green]
        > > What are some ways I can deny access to an aspx page other than removing[/color]
        > it[color=green]
        > > altogether from the site? I need the ability to temporarily prevent all
        > > users from accessing certain pages.
        > >
        > > Thanks.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Curt_C [MVP]

          #5
          Re: Deny Access To A Page

          any modification to the webconfig causes the site to reload. everything is
          dumped/restarted so to speak

          --
          Curt Christianson
          Owner/Lead Developer, DF-Software



          "Gene" <MrWilder@jw.co m> wrote in message
          news:OqmpDjiJEH A.952@TK2MSFTNG P12.phx.gbl...[color=blue]
          > Sounds like a great option. Suppose I make only one change to Web.config
          > (add a page to the <location> region): would the only effect be that any
          > subseqeunt requests for the page are denied? Are existing sessions left
          > intact?
          >
          >
          >
          >
          >
          > "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld @comcast.netNoS pamM> wrote in
          > message news:%23a5DBdiJ EHA.2556@TK2MSF TNGP11.phx.gbl. ..[color=green]
          > > Set up a <location> region in your web.config for each of those pages[/color][/color]
          and[color=blue][color=green]
          > > set authentication to where all users are denied.
          > >
          > > --
          > > Gregory A. Beamer
          > > MVP; MCP: +I, SE, SD, DBA
          > >
          > > *************** *************** *************** *************** **********
          > > Think Outside the Box!
          > > *************** *************** *************** *************** **********
          > > "Gene" <MrWilder@jw.co m> wrote in message
          > > news:%23jn3DWiJ EHA.1220@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
          > > > What are some ways I can deny access to an aspx page other than[/color][/color][/color]
          removing[color=blue][color=green]
          > > it[color=darkred]
          > > > altogether from the site? I need the ability to temporarily prevent[/color][/color][/color]
          all[color=blue][color=green][color=darkred]
          > > > users from accessing certain pages.
          > > >
          > > > Thanks.
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Cowboy \(Gregory A. Beamer\)

            #6
            Re: Deny Access To A Page

            Curt is correct. Also, note that anyone trying to reach the page will still
            be "able" to reach it, just denied access. If you have links to the page(s)
            in question, it should be considered a "programmin g" bug.

            --
            Gregory A. Beamer
            MVP; MCP: +I, SE, SD, DBA

            *************** *************** *************** *************** **********
            Think Outside the Box!
            *************** *************** *************** *************** **********
            "Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
            news:umv6apiJEH A.2704@TK2MSFTN GP10.phx.gbl...[color=blue]
            > any modification to the webconfig causes the site to reload. everything is
            > dumped/restarted so to speak
            >
            > --
            > Curt Christianson
            > Owner/Lead Developer, DF-Software
            > www.Darkfalz.com
            >
            >
            > "Gene" <MrWilder@jw.co m> wrote in message
            > news:OqmpDjiJEH A.952@TK2MSFTNG P12.phx.gbl...[color=green]
            > > Sounds like a great option. Suppose I make only one change to Web.config
            > > (add a page to the <location> region): would the only effect be that[/color][/color]
            any[color=blue][color=green]
            > > subseqeunt requests for the page are denied? Are existing sessions left
            > > intact?
            > >
            > >
            > >
            > >
            > >
            > > "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld @comcast.netNoS pamM> wrote[/color][/color]
            in[color=blue][color=green]
            > > message news:%23a5DBdiJ EHA.2556@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
            > > > Set up a <location> region in your web.config for each of those pages[/color][/color]
            > and[color=green][color=darkred]
            > > > set authentication to where all users are denied.
            > > >
            > > > --
            > > > Gregory A. Beamer
            > > > MVP; MCP: +I, SE, SD, DBA
            > > >
            > > > *************** *************** *************** *************** **********
            > > > Think Outside the Box!
            > > > *************** *************** *************** *************** **********
            > > > "Gene" <MrWilder@jw.co m> wrote in message
            > > > news:%23jn3DWiJ EHA.1220@TK2MSF TNGP11.phx.gbl. ..
            > > > > What are some ways I can deny access to an aspx page other than[/color][/color]
            > removing[color=green][color=darkred]
            > > > it
            > > > > altogether from the site? I need the ability to temporarily prevent[/color][/color]
            > all[color=green][color=darkred]
            > > > > users from accessing certain pages.
            > > > >
            > > > > Thanks.
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...