473,883 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
"customErro rs off" with setting in machine.config and not web.config.

Any thoughts?
--Max
Dec 27 '05 #1
2 3508
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 ="~/GenericErrorPag e.aspx">
<error statusCode="403 " redirect="NoAcc ess.htm" />
<error statusCode="404 " redirect="FileN otFound.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.e xe" to restart IIS......

For asp.net 2.0, we use a global web.config (under
%windir%\micros oft.net\framewo rk\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******@hotma il.com>
| Newsgroups: microsoft.publi c.dotnet.framew ork.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.n et>
| Lines: 11
| NNTP-Posting-Host: 66.92.91.130
| X-Trace:
sv3-FYuRqAsjoWp34Z1 tpW1vLw/MUPOp/t7ssMd8bu/Apg6h8OG68tiBLB no8OKwyQUB3EVVn Bu4
Cp/Orfl!9ZLHCq0H3A vJ/ExyscLuqohcoXCr hpI56AW+egeSk9e jltcMJdWZJBWeYI csBUTjypAH
6ba5HkDR!+e4Li5 L/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.p hx.gbl!TK2MSFTN GXA01.phx.gbl!T K2MSFTFEED02.ph x.gbl!tornado.f a
stwebnet.it!tis cali!newsfeed1. ip.tiscali.net! proxad.net!216. 239.36.134.MISM A
TCH!postnews.go ogle.com!news3. google.com!bord er1.nntp.dca.gi ganews.com!nntp .
giganews.com!lo cal01.nntp.dca. giganews.com!nn tp.speakeasy.ne t!news.speakeas y
..net.POSTED!no t-for-mail
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3671 55
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
| "customErro rs 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.n et>
| 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.publi c.dotnet.framew ork.aspnet
| Message-ID: <nx************ **@TK2MSFTNGXA0 2.phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Lines: 90
| Path: TK2MSFTNGXA02.p hx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3672 27
| 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 ="~/GenericErrorPag e.aspx">
| <error statusCode="403 " redirect="NoAcc ess.htm" />
| <error statusCode="404 " redirect="FileN otFound.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.e xe" to restart IIS......
|
| For asp.net 2.0, we use a global web.config (under
| %windir%\micros oft.net\framewo rk\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******@hotma il.com>
| | Newsgroups: microsoft.publi c.dotnet.framew ork.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.n et>
| | Lines: 11
| | NNTP-Posting-Host: 66.92.91.130
| | X-Trace:
|
sv3-FYuRqAsjoWp34Z1 tpW1vLw/MUPOp/t7ssMd8bu/Apg6h8OG68tiBLB no8OKwyQUB3EVVn Bu4
|
Cp/Orfl!9ZLHCq0H3A vJ/ExyscLuqohcoXCr hpI56AW+egeSk9e jltcMJdWZJBWeYI csBUTjypAH
| 6ba5HkDR!+e4Li5 L/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.p hx.gbl!TK2MSFTN GXA01.phx.gbl!T K2MSFTFEED02.ph x.gbl!tornado.f a
|
stwebnet.it!tis cali!newsfeed1. ip.tiscali.net! proxad.net!216. 239.36.134.MISM A
|
TCH!postnews.go ogle.com!news3. google.com!bord er1.nntp.dca.gi ganews.com!nntp .
|
giganews.com!lo cal01.nntp.dca. giganews.com!nn tp.speakeasy.ne t!news.speakeas y
| .net.POSTED!not-for-mail
| | Xref: TK2MSFTNGXA02.p hx.gbl
| microsoft.publi c.dotnet.framew ork.aspnet:3671 55
| | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
| | "customErro rs 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
4405
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 *ipAddress = S""; IDictionary *server_config = dynamic_cast<IDictionary*>(ConfigurationSettings::GetConfig("ServerAddress") ); ipAddress = dynamic_cast<String*>(server_config->get_Item(S"IP"));
9
3011
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 trying to login with correct credentials it give me error: Server Error in '/PDVMgr' Application. ----------------------------------------------------------------------------
0
1507
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 it on a 2003 box with both version 1.0 and 1.1 installed. This appears to work. When move the page and code to my clients hosting service (Earthlink) which only supports version 1.0 of the framework, I get the error below. I know that my...
10
2863
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 mode="RemoteOnly" defaultRedirect="/customerrors/500.aspx"> <error statusCode="404" redirect="/customerrors/404.html" /> </customErrors> When running pages directly on the server it still redirects when a error occurs, even though it should not judging by...
1
1479
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 be displayed because customErrors is set to remoteOnly in web.config. Right now the application consists of a single page that displays the current date and time -- test.aspx. I can browse plain html files in the same directory without any...
2
2161
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 message: Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It
14
5632
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. For more information, turn off customErrors in the server's .config file." Where do I turn this off
0
11112
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10730
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10405
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7959
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7114
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5784
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4205
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3228
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.