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

Single customErrors For Multiple system.web in web.config

111 100+
Hi,

I want to use the <customErrors> for all <system.web></system.web>

If error occure this should be called.

I have to write it once not in every <system.web></system.web>.

How can I?


<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="Login" timeout="10" path="/" protection="All" defaultUrl ="Home.aspx"></forms>
</authentication>

<customErrors defaultRedirect="CustomErrors/ErrorPage.aspx" mode="On">
<error statusCode="500" redirect="CustomErrors/ServerError.aspx" />
<error statusCode="404" redirect="CustomErrors/FileNotFound.aspx" />
<error statusCode="403" redirect="CustomErrors/AccessDenied.aspx" />
</customErrors>


</system.web>

<location path="Files" allowOverride="false">
<system.web>
<authorization>
<allow roles="User"/>
<deny roles ="Admin"/>
<deny users="?"/>
</authorization>

<customErrors defaultRedirect="CustomErrors/ErrorPage.aspx" mode="On">
<error statusCode="500" redirect="CustomErrors/ServerError.aspx" />
<error statusCode="404" redirect="CustomErrors/FileNotFound.aspx" />
<error statusCode="403" redirect="CustomErrors/AccessDenied.aspx" />
</customErrors>


</system.web>
</location>

Thanks in advance.
Feb 6 '08 #1
0 972

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

Similar topics

6
by: Samuel | last post by:
A few (not all) of my clients are getting this error with a web thumbnail generator code I wrote ============================= Runtime Error Description: An application error occurred on the...
6
by: John Smith | last post by:
I am trying to implement custom error pages and I get this error message: **************************************************************************** ********...
21
by: nicholas | last post by:
Although in my web.config I have <customErrors mode="off" /> I still get no detailed errors. How comes ? THX This is what I get: Server Error in '/mywebfolder'Application.
1
by: Chumley Walrus | last post by:
I'm having trouble seeing my page when I publish it on my live server. I created a project in VS.net (with MMIT integrated), created a simple index.aspx mobilewebform page , I can see it in my...
0
by: dw | last post by:
Hi, all. I've deployed an ASP.NET 1.1 app from my localhost where it works fine to a server on the network, but when accessed from my machine through the Web, it first asks for me to log into the...
9
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. Is it programatically possible in VB.NET to read the contents of web.config's <customErrorselement? I looked at using ConfigurationSettings.AppSettings, but that doesn't work. I need to...
1
by: viveknaik17 | last post by:
When i upload aspx pages, it gives error of type.. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a...
3
by: Tahir | last post by:
Hi, i am delevoping an ASP.NET website which worked well on my old web host and now working on localhost but now it doesnt works on my new host. i have new registered and ftp the files that...
15
denny1824
by: denny1824 | last post by:
I have a working website. I copied all the files to a new folder in inetpub/wwwroot and then set that folder as a Virtual Directory in IIS. I try going to that site from the new folder and i am...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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.