473,407 Members | 2,546 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,407 software developers and data experts.

access denied message is not shown!!

Hi,
I'm using ASP.NET custom membership provider, I have created a list of users and their roles in a single XML file.
I'm using three login controls in my app, one located at Admin/login.aspx page, and single web.config file is located at the root.

The page \Admin\Admin.aspx allow only user with Admin role access.
here is a part of my web.config

Expand|Select|Wrap|Line Numbers
  1.   <location path="Admin/Admin.aspx">
  2.     <system.web>
  3.       <authorization>
  4.         <allow roles="Admin" />
  5.         <deny users="*" />
  6.       </authorization>
  7.     </system.web>
  8.   </location>
When a user with Normal role try to access Admin.aspx, then the login web page is reloaded!
why the access denied message is not shown when the users tries to access the page in different role?
in other meaning how can I display error msg to a user if he isn't authorize to see the page.
I tried to use this code, but it doesn't work
Expand|Select|Wrap|Line Numbers
  1.     <customErrors defaultRedirect="ErrorPage.aspx" mode="On">
  2.       <error statusCode="400" redirect="AccessDenied.aspx" />
  3.     </customErrors>
hope help me, thanks to everyone!!
Aug 29 '08 #1
1 1115
kenobewan
4,871 Expert 4TB
I don't believe that error is thrown by ASP.NET custom membership provider. Use redirect method in the provider. HTH.
Aug 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Steve | last post by:
This really surprised me. I setup an iFrame in my document to display data from another table. For me, this was a way to be able to update that data without having to reload the whole page. Also,...
3
by: red | last post by:
I know this is probably a faq but it is hard to search for this exact problem. When I put this on a php page: <? $link = mysql_connect("localhost", "cardini", "password") or die("Could not...
2
by: calfdog | last post by:
Hello, Does anyone know a workaround for calling fireEvent. With the latest from Microsoft OS XP2 and Hot fixes to IE it now gives an "access denied" error in Python when called. Here is what...
0
by: Gary L | last post by:
I'm having a problem getting my web site up and running. Executing it on the server using localhost the site comes up fine. If I try to use the URL either from the server or an external machine I...
0
by: Edward Jones | last post by:
I want to send users to an Access Denied page rather than the Login page when they are authenticated but not authorized to see a specific page while using Forms based authentication in ASP.Net. ...
1
by: Michael Hetrick | last post by:
If I set authorization in a web.config file to only allow certain individuals access to pages, those users who are not named receive an access denied message: ---------------------------------...
5
by: D Godwin | last post by:
I am running a web service on my local machine (using standard VS.NET test pages) that is attempting to access a SQL database on a network server. C# code looks something like this: public...
2
by: ad | last post by:
I have a virtual which is a web service. When I use the IP to get the web service, it return a access denied message: http://xxx.xxx.xxx.xxx/HealthService/Service.asmx but if I use local host,...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.