473,386 Members | 1,602 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.

Which elements on web.config to force re-direct to the another page?

ABC
I have a web site include three folders: public, admin and member.

I place web.config files to admin and members folders only allow admin and
members to access. If there are a user login as Demo which is not both
admin and member roles. But it should not to access admin and member
folders. I can success to limit accessing those folders, but it force users
re-login screen. It is not expected to redirect to public/default.aspx.

Which elements on web.config to force re-direct to the another page?


Nov 19 '05 #1
3 1287
This should work.

Since 403 is access denied. Redirect to the page you want on 403
errors

<customErrors defaultRedirect="error.aspx" mode="On">
<error statusCode="403" redirect="re_login.aspx" />
</customErrors>

Nov 19 '05 #2
Try looking at IIS status code to check here at:-
http://support.microsoft.com/default...b;en-us;318380
i think its 401
Patrick

"Josh Berkheimer" <jb******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
This should work.

Since 403 is access denied. Redirect to the page you want on 403
errors

<customErrors defaultRedirect="error.aspx" mode="On">
<error statusCode="403" redirect="re_login.aspx" />
</customErrors>

Nov 19 '05 #3
And this should guide you to trapping status code 401
http://www.codeproject.com/aspnet/Custon401Page.asp
Hope that helps
Patrick

"ABC" <abc.abc.com> wrote in message
news:em*************@TK2MSFTNGP10.phx.gbl...
I have a web site include three folders: public, admin and member.

I place web.config files to admin and members folders only allow admin and
members to access. If there are a user login as Demo which is not both
admin and member roles. But it should not to access admin and member
folders. I can success to limit accessing those folders, but it force users re-login screen. It is not expected to redirect to public/default.aspx.

Which elements on web.config to force re-direct to the another page?

Nov 19 '05 #4

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

Similar topics

1
by: José Joye | last post by:
Hello, I have an assembly that is used by a VB6 application. This application can be a normal exe or an ActiveX (called through CCW). My assembly needs to get extra info from a config file. In...
8
by: MENTAT | last post by:
Hi Guys, Newbie question here. Part of my xml looks like this. <node> <description/> <config/> <log/> <transition/> <node>
1
by: Klas Mellbourn | last post by:
I have several assemblies, in separate dll:s, each with nunit tests embedded. Every assembly requires its own config file. I would like to run all nunit tests on the same command line. Like this: ...
2
by: Scanner2001 | last post by:
I have a service with settings in the app.config file. I would like to be able to change these settings without restarting the service. Something similar to a web.config with web services. Whenever...
3
by: Mustaq | last post by:
Hi, How to read same config file from different application? I have 4 application in VB.NET, all are using different app.config files. NOW I need all to read only one config file, how can I do...
3
by: Clark Spencer | last post by:
I have built a small integration app using VS .NET 2003 that extracts orderinformation from a 'webshop'. Extracting the orderinformation works fine. Appending the order elements in the...
3
by: Bragadiru | last post by:
I have a solution with 2 projects: a class library(my.dll) + a windows application (mine.exe). In exe project I have a reference to the dll. In both I have app.config files, BUT only...
0
by: venkatbo | last post by:
Hi, I'm trying to cross compile a C extension - on a i686 linux box, targeting a ppc-linux box. get_config_vars(*args): global _config_vars if _config_vars is None: ... else:
1
by: CrazyOnYou | last post by:
I've been trying to figure out an issue that's happened twice when deploying changes to configuration file for a .Net DLL used by an ASP.Net 2.0 Web Service. We deploy to servers using RANT and...
6
by: Peted | last post by:
Hi, im wanting to store some custom text strings in the app.config file of a c# app, to be retreived and updated when the app runs. using c# 2005 express in my testing i am using the code...
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...
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,...

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.