473,385 Members | 1,942 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.

problem with role and accessibility

Hi,

i defined a role ('manager') with one memberuser: Bob.
The website has a subdirectory called "allusers" which contains two pages:
allusers.aspx and manager.aspx.
The page allusers.aspx must be accessible by all users while the page
manager.aspx must be only accessible by members of the role manager.

The web.config of directory 'allusers' contains this:

<location path="manager.aspx">
<system.web>
<authorization>
<deny users="*" />
<allow roles="manager" />
</authorization>
</system.web>
</location>

When logged via login.aspx, the user is redirected to a menu.apsx with a
hyperlink to manager.aspx.
When logged as Bob and clicking on the link to manager.aspx, i have no
access and i'm redirected to login.aspx.
Why?

I added in web.config this:

<allow users="Bob" />

but still no access !!!

What's wrong here?
Thanks
Chris
Jun 19 '07 #1
2 1102
For the sake of completeness, have you tried copying the string "manager"
from your web.config file and doing a IsUserInRole to verify that "Bob" or
whatever is, indeed, in the role? Perhaps do a redirect if he is and just
verify that you have things configured properly.
http://msdn2.microsoft.com/en-us/lib...erinrole.aspxA
whole slew of weird things could be off somewhere.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Rush
Microsoft .NET Consultant
http://www.ben-rush.net/blog
http://www.sideshowsystems.com
"Chris" <cc@dd.ddwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Hi,

i defined a role ('manager') with one memberuser: Bob.
The website has a subdirectory called "allusers" which contains two pages:
allusers.aspx and manager.aspx.
The page allusers.aspx must be accessible by all users while the page
manager.aspx must be only accessible by members of the role manager.

The web.config of directory 'allusers' contains this:

<location path="manager.aspx">
<system.web>
<authorization>
<deny users="*" />
<allow roles="manager" />
</authorization>
</system.web>
</location>

When logged via login.aspx, the user is redirected to a menu.apsx with a
hyperlink to manager.aspx.
When logged as Bob and clicking on the link to manager.aspx, i have no
access and i'm redirected to login.aspx.
Why?

I added in web.config this:

<allow users="Bob" />

but still no access !!!

What's wrong here?
Thanks
Chris


Jun 19 '07 #2
thanks, but it just found it:

<deny=..must come after <allow ...>

...

"Ben Rush" <ben@sideshowsystemsDOTcomschreef in bericht
news:Oo**************@TK2MSFTNGP06.phx.gbl...
For the sake of completeness, have you tried copying the string "manager"
from your web.config file and doing a IsUserInRole to verify that "Bob" or
whatever is, indeed, in the role? Perhaps do a redirect if he is and just
verify that you have things configured properly.
http://msdn2.microsoft.com/en-us/lib...erinrole.aspxA
whole slew of weird things could be off somewhere.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Rush
Microsoft .NET Consultant
http://www.ben-rush.net/blog
http://www.sideshowsystems.com
"Chris" <cc@dd.ddwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>Hi,

i defined a role ('manager') with one memberuser: Bob.
The website has a subdirectory called "allusers" which contains two
pages: allusers.aspx and manager.aspx.
The page allusers.aspx must be accessible by all users while the page
manager.aspx must be only accessible by members of the role manager.

The web.config of directory 'allusers' contains this:

<location path="manager.aspx">
<system.web>
<authorization>
<deny users="*" />
<allow roles="manager" />
</authorization>
</system.web>
</location>

When logged via login.aspx, the user is redirected to a menu.apsx with a
hyperlink to manager.aspx.
When logged as Bob and clicking on the link to manager.aspx, i have no
access and i'm redirected to login.aspx.
Why?

I added in web.config this:

<allow users="Bob" />

but still no access !!!

What's wrong here?
Thanks
Chris



Jun 19 '07 #3

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

Similar topics

2
by: Tjerk Wolterink | last post by:
Hello i've an xpath problem using sablatron in php. In xsl i have the following code: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
4
by: waltborders | last post by:
Hi, Because the blind are unable to use a mouse, keyboard navigation is key. A major difficulty is that not all windows forms controls are keyboard 'tab-able' or 'arrow-able' or have "tab...
1
by: Darren Brook | last post by:
Hi I have an asp.net 2.0 project and am experiencing a problem. In the project, I am trying to make use of Membership. I have one Role, called "Basic User" and two users - "admin" and...
0
by: Darren Brook | last post by:
Hi I have an asp.net 2.0 project and am experiencing a problem. In the project, I am trying to make use of Membership. I have one Role, called "Basic User" and two users - "admin" and...
0
by: Darren Brook | last post by:
Hi I have an asp.net 2.0 project and am experiencing a problem. In the project, I am trying to make use of Membership. I have one Role, called "Basic User" and two users - "admin" and...
5
by: Darren Brook | last post by:
Hi I have an asp.net 2.0 project and am experiencing a problem. In the project, I am trying to make use of Membership. I have one Role, called "Basic User" and two users - "admin" and...
2
dcharnigo
by: dcharnigo | last post by:
Here is my database layout: Institution: ...inst_id ...inst_name IsUser: ...user_id ...login ...Institution_inst_id
5
by: tom.hepworth | last post by:
Hi I have a problem which I hope someone can help me with because I really don't even know where to start with it. I am using Access 2003. I have a delimited text file which contains about...
7
by: monty | last post by:
Hi All, I am facing a problem while executing a statement through C++ code using OLEDB API of Sql server. There is a problem with DB_OWNER role. If I will enable the DB_OWNER everything is...
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: 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?
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.