473,385 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.
Nov 18 '05 #1
5 2194
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" <Mr******@jw.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.

Nov 18 '05 #2
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
Nov 18 '05 #3
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)" <No************@comcast.netNoSpamM> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <Mr******@jw.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.


Nov 18 '05 #4
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" <Mr******@jw.com> wrote in message
news:Oq*************@TK2MSFTNGP12.phx.gbl...
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)" <No************@comcast.netNoSpamM> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <Mr******@jw.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.



Nov 18 '05 #5
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 "programming" bug.

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

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:um**************@TK2MSFTNGP10.phx.gbl...
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" <Mr******@jw.com> wrote in message
news:Oq*************@TK2MSFTNGP12.phx.gbl...
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)" <No************@comcast.netNoSpamM> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <Mr******@jw.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> 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.
>
>



Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Carlos Marangon | last post by:
hello! Can anyone please tell me where can I find a script that deny access if password is wrong 3 times CM
2
by: spike | last post by:
I tried to upload a .htaccess-file to the directory that i wanted to protect. This is what I wrote in it: ------------------------------------------------ <Limit GET> order deny,allow deny from...
2
by: Galahad | last post by:
I have a current requirement to deny access to a particular website from a list of domains. I can add these domains to a deny list in IIS, however that doesn't give me the ability detect these...
5
by: Gene | last post by:
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.
4
by: Dan | last post by:
hi ng. i have a strange behaviour when i want to control who can access a web application by setting web.config like: <authorization> <allow users="DOMAIN\ACCOUNT,..." /> <deny users="*" /> ...
1
by: ABC | last post by:
I want to check the user roles for allow/deny access each pages. I know it is possible to add check code on each page. But is very spent time. Is there any configuration (web config) parameters...
5
by: profdotnet | last post by:
Below is the code of web.config file: <configuration> <system.web> <authentication mode="Forms" /> <authorization> <allow users="Admin"/> <deny users="Jack,Mary" /> <deny users="?">...
2
by: Markus Palme | last post by:
Hi NG! Is it possible to deny access to a (logged in) user that is not in any role? Placeholders like <deny roles="?"/don't seem to be possible. Regards Markus <location...
0
by: Douglas J. Badin | last post by:
Hi, The problem with Authorization is it stops at the first match and doesn't permit Grouping. On the Web Site, I am trying to Secure Page Access and SiteNaviagation by implementing the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.