473,386 Members | 1,943 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,386 software developers and data experts.

Try to restrict acces to all my pages.


Hello,
I'm trying to protect my pages by allowing only authenticated users to view
them.
I have therefore taken the following action in web.config:
<authentication mode="Forms">

<forms name=".Mycookiename" loginUrl="Login.aspx" protection="All"
timeout="30" path="/">

</forms>

</authentication>

---

---

---

<authorization>

<allow users="?" /> <!-- Allow all users -->

</authorization>

But when i attempt to view any page in my virtual directory,

i'm not redirected to the login page. What i'm i doing wrong?

Many thanks in advance

JB
Nov 19 '05 #1
2 893
Sorry i found the bug.

<allow users="?" /> <!-- Allow all users -->
deny users="?" instead of allow users="?"
</authorization>

But when i attempt to view any page in my virtual directory,

i'm not redirected to the login page. What i'm i doing wrong?

Many thanks in advance

JB

Nov 19 '05 #2
hey Jensen,

try this and replace the user credentials with your user credentials

<authentication mode="Forms" > <!-- Set authentication mode -->
<forms loginUrl="LogIn.aspx" > <!-- Specify a log on form -->
<credentials passwordFormat="Clear"> <!-- Create a user list -->
<user name="Jensen" password="JensenPassword"/>
</credentials>
</forms>
</authentication>

<authorization>
<deny users="?" /> <!—Deny all unauthenticated users -->
</authorization>
Note :- dont forget too add this tag or else it wont be redirected to the
login page
<forms loginUrl="LogIn.aspx" > <!-- Specify a log on form -->
********************************
Hope this helps,

Shaun
http://blogs.wwwcoder.com/shaunakp
********************************

"Jensen bredal" wrote:
Sorry i found the bug.

<allow users="?" /> <!-- Allow all users -->


deny users="?" instead of allow users="?"

</authorization>

But when i attempt to view any page in my virtual directory,

i'm not redirected to the login page. What i'm i doing wrong?

Many thanks in advance

JB


Nov 19 '05 #3

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

Similar topics

6
by: gsb | last post by:
I have a php program that sends images to my html pages. <img src="url/send.php?id=whatever" ... How can I stop people from linking this php program from another site or simply typing it into...
3
by: Paul | last post by:
Hi all, at present I I've built a website which can be updated by admin and users. My problem, I've combined "log in" and "access levels" to restrict access to certain pages, using the built...
28
by: gc | last post by:
Hi, What is the purpose of the restrict keyword? gc
2
by: Jaydeep | last post by:
Hi, I want to restrict any user if he types url directly in the browser without logging to my site. Like for example user should not see any listing page of my web site by typing url...
21
by: Niu Xiao | last post by:
I see a lot of use in function declarations, such as size_t fread(void* restrict ptr, size_t size, size_t nobj, FILE* restrict fp); but what does the keyword 'restrict' mean? there is no...
2
by: Frederick Gotham | last post by:
I did a search through the C++ Standard there, and couldn't find any mention of "restrict" or "__restrict__". Firstly, could someone please confirm whether "restrict" is mentioned in the C++...
1
by: thavaht | last post by:
I’ve been searching on the forum and don’t seem to find a post that matches my question: I need to restrict access to some php pages on a web site to computers on the same domain or local network,...
1
by: Mubs | last post by:
Hi PPL, On my website i have setup user log in. once they log in i want to restrict certain users from certain pages.. and on some pages i want the user to enter their username and password...
4
by: vinpkl | last post by:
hi i am working on admin section which has a login page with login id and pasword form. in my admin section i have many pages say like manage_products.php, description.php, user.php etc. if i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.