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

Machine.config and customErrors

I'm trying to set the default behavior of customErrors in the
machine.config. The documentation seems to suggest this should work, but it
doesn't seem to work for me. On my development machine, I want customErrors
off, and on my production machine I want them to go to a friendly error page
(so on with a defaultRedirect). No matter what I do, I only get
"customErrors off" with setting in machine.config and not web.config.

Any thoughts?
--Max
Dec 27 '05 #1
2 3474
Hi Max,

Welcome to ASP.NET newsgroup.
As for the <customErrors> setting, it can be configured at both
machine.config or application web.config level... Are you using asp.net
1.1 or 2.0?

<customErrors mode="On" defaultRedirect="~/GenericErrorPage.aspx">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

For asp.net 1.1, we just need to configure the <customErros> element in
machine.config file.... and to make sure it take effect, you can run
"iisreset.exe" to restart IIS......

For asp.net 2.0, we use a global web.config (under
%windir%\microsoft.net\framework\vxxxx\config dir.....) instead of
machine.config for configuring machine level asp.net setting. So you can
put the <customErrors> setting in that global web.config file........

Also, after you save the change, if you're testing in VS2005's test server,
you can directly see the changes take effect. If you're hosting the
application in IIS, I also suggest you restart IIS......

In addition, both of the machine level <customErrors> setting mentioned
above can be override by appliation level web.config.....

If you have any further question or meet any particular problem, please
feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| NNTP-Posting-Date: Tue, 27 Dec 2005 10:02:35 -0600
| From: "Max Metral" <me******@hotmail.com>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Machine.config and customErrors
| Date: Tue, 27 Dec 2005 11:02:34 -0500
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <mc******************************@speakeasy.net>
| Lines: 11
| NNTP-Posting-Host: 66.92.91.130
| X-Trace:
sv3-FYuRqAsjoWp34Z1tpW1vLw/MUPOp/t7ssMd8bu/Apg6h8OG68tiBLBno8OKwyQUB3EVVnBu4
Cp/Orfl!9ZLHCq0H3AvJ/ExyscLuqohcoXCrhpI56AW+egeSk9ejltcMJdWZJBWeYIcsBUT jypAH
6ba5HkDR!+e4Li5L/s3hgZC/RC8TSrPKvOo32SA==
| X-Complaints-To: ab***@speakeasy.net
| X-DMCA-Complaints-To: ab***@speakeasy.net
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TFEED02.phx.gbl!tornado.fa
stwebnet.it!tiscali!newsfeed1.ip.tiscali.net!proxa d.net!216.239.36.134.MISMA
TCH!postnews.google.com!news3.google.com!border1.n ntp.dca.giganews.com!nntp.
giganews.com!local01.nntp.dca.giganews.com!nntp.sp eakeasy.net!news.speakeasy
..net.POSTED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367155
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm trying to set the default behavior of customErrors in the
| machine.config. The documentation seems to suggest this should work, but
it
| doesn't seem to work for me. On my development machine, I want
customErrors
| off, and on my production machine I want them to go to a friendly error
page
| (so on with a defaultRedirect). No matter what I do, I only get
| "customErrors off" with setting in machine.config and not web.config.
|
| Any thoughts?
| --Max
|
|
|

Dec 28 '05 #2
Hi Max,

How are you doing on this issue, does my last reply helps you a little?
If there're anything else we can help, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 41244368
| References: <mc******************************@speakeasy.net>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 28 Dec 2005 02:26:07 GMT
| Subject: RE: Machine.config and customErrors
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <nx**************@TK2MSFTNGXA02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 90
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367227
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Max,
|
| Welcome to ASP.NET newsgroup.
| As for the <customErrors> setting, it can be configured at both
| machine.config or application web.config level... Are you using asp.net
| 1.1 or 2.0?
|
| <customErrors mode="On" defaultRedirect="~/GenericErrorPage.aspx">
| <error statusCode="403" redirect="NoAccess.htm" />
| <error statusCode="404" redirect="FileNotFound.htm" />
| </customErrors>
|
| For asp.net 1.1, we just need to configure the <customErros> element in
| machine.config file.... and to make sure it take effect, you can run
| "iisreset.exe" to restart IIS......
|
| For asp.net 2.0, we use a global web.config (under
| %windir%\microsoft.net\framework\vxxxx\config dir.....) instead of
| machine.config for configuring machine level asp.net setting. So you can
| put the <customErrors> setting in that global web.config file........
|
| Also, after you save the change, if you're testing in VS2005's test
server,
| you can directly see the changes take effect. If you're hosting the
| application in IIS, I also suggest you restart IIS......
|
| In addition, both of the machine level <customErrors> setting mentioned
| above can be override by appliation level web.config.....
|
| If you have any further question or meet any particular problem, please
| feel free to post here.
|
| Regards,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
| --------------------
| | NNTP-Posting-Date: Tue, 27 Dec 2005 10:02:35 -0600
| | From: "Max Metral" <me******@hotmail.com>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | Subject: Machine.config and customErrors
| | Date: Tue, 27 Dec 2005 11:02:34 -0500
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| | X-RFC2646: Format=Flowed; Original
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| | Message-ID: <mc******************************@speakeasy.net>
| | Lines: 11
| | NNTP-Posting-Host: 66.92.91.130
| | X-Trace:
|
sv3-FYuRqAsjoWp34Z1tpW1vLw/MUPOp/t7ssMd8bu/Apg6h8OG68tiBLBno8OKwyQUB3EVVnBu4
|
Cp/Orfl!9ZLHCq0H3AvJ/ExyscLuqohcoXCrhpI56AW+egeSk9ejltcMJdWZJBWeYIcsBUT jypAH
| 6ba5HkDR!+e4Li5L/s3hgZC/RC8TSrPKvOo32SA==
| | X-Complaints-To: ab***@speakeasy.net
| | X-DMCA-Complaints-To: ab***@speakeasy.net
| | X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| | X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
| complaint properly
| | X-Postfilter: 1.3.32
| | Path:
|
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TFEED02.phx.gbl!tornado.fa
|
stwebnet.it!tiscali!newsfeed1.ip.tiscali.net!proxa d.net!216.239.36.134.MISMA
|
TCH!postnews.google.com!news3.google.com!border1.n ntp.dca.giganews.com!nntp.
|
giganews.com!local01.nntp.dca.giganews.com!nntp.sp eakeasy.net!news.speakeasy
| .net.POSTED!not-for-mail
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:367155
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | I'm trying to set the default behavior of customErrors in the
| | machine.config. The documentation seems to suggest this should work,
but
| it
| | doesn't seem to work for me. On my development machine, I want
| customErrors
| | off, and on my production machine I want them to go to a friendly error
| page
| | (so on with a defaultRedirect). No matter what I do, I only get
| | "customErrors off" with setting in machine.config and not web.config.
| |
| | Any thoughts?
| | --Max
| |
| |
| |
|
|

Jan 3 '06 #3

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

Similar topics

1
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String...
9
by: Marina Anufreichik | last post by:
Hi, After deploymnet web application on web server I can access page on local machine and login fine but when I'm trying to access web site from remote machine I can see login page, but when I'm...
0
by: Roy Chastain | last post by:
I have a simple page or two and a simple global.asax file that loads some configuration from the web.config file. I developed this on a Windows XP box with framework version 1.1 installed. I run...
10
by: Ron Weldy | last post by:
I am working on a website that someone else has set up. They have a web.config file with a customerrors element that points the error handling to a special aspx page. <customErrors...
1
by: Tim Wood | last post by:
I'm having trouble with setup of an asp.net application on Windows 2003. When I attempt to start the app I get "Server Error in '/MyApp' application. The message also says that error details cannot...
2
by: kramer.newsreader | last post by:
I am develoing a C# web application on a remote server. I have publish access to this server, but not permission to change configuration setting. When I try to load my page, I get the following...
14
by: Peter | last post by:
..NET 3.5 I have a Windows Service application and it does remoting, but when a client incounters an error the client get the following error message "Server encountered an internal error....
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
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.