473,385 Members | 1,341 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,385 software developers and data experts.

Handler in Global web.config doesn't work

Hello,
I'm trying to enable an error handling package at the root of my web server
by editing this file:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CO NFIG\web.config

In the httpHandlers section I've added:

<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory,
Elmah, Version=1.0.9414.0, Culture=neutral, PublicKeyToken=42734318a98ac1df"
validate="true" />

This handlder works fine when declared in the application's local
web.config. But when I move it to the global web.config calls to 'elmah.axd'
cause a 404 error. There are many other httphandlers in global web.config
that seem to work fine. I've tried path variations starting with a tilde(~)
and asterix at both ends; no luck.

Thanks for any advice.
Mar 11 '08 #1
5 4498
Web.config files are only valid for an application or a subdirectory of an application.

Any changes you make to the global web.config will be reflected
in the web root's configuration, and not in individual applications.

Make the changes in your application's web.config.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"mcqwerty" <mc******@nospam.nospamwrote in message news:CD**********************************@microsof t.com...
Hello,
I'm trying to enable an error handling package at the root of my web server
by editing this file:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CO NFIG\web.config

In the httpHandlers section I've added:

<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory,
Elmah, Version=1.0.9414.0, Culture=neutral, PublicKeyToken=42734318a98ac1df"
validate="true" />

This handlder works fine when declared in the application's local
web.config. But when I move it to the global web.config calls to 'elmah.axd'
cause a 404 error. There are many other httphandlers in global web.config
that seem to work fine. I've tried path variations starting with a tilde(~)
and asterix at both ends; no luck.

Thanks for any advice.

Mar 11 '08 #2
Thanks for your reply but you're mistaken. You can affect all your
applications by editing the global web.config file. IIS even offers a button
labeled "Edit Global Configuration..." on the "ASP.NET" tab of a website
properites dialog.

Many other changes I've made to the global web.config work fine. It's just
this httpHandler that's acting up.

Thanks again.

"Juan T. Llibre" wrote:
Web.config files are only valid for an application or a subdirectory of an application.

Any changes you make to the global web.config will be reflected
in the web root's configuration, and not in individual applications.

Make the changes in your application's web.config.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"mcqwerty" <mc******@nospam.nospamwrote in message news:CD**********************************@microsof t.com...
Hello,
I'm trying to enable an error handling package at the root of my web server
by editing this file:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CO NFIG\web.config

In the httpHandlers section I've added:

<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory,
Elmah, Version=1.0.9414.0, Culture=neutral, PublicKeyToken=42734318a98ac1df"
validate="true" />

This handlder works fine when declared in the application's local
web.config. But when I move it to the global web.config calls to 'elmah.axd'
cause a 404 error. There are many other httphandlers in global web.config
that seem to work fine. I've tried path variations starting with a tilde(~)
and asterix at both ends; no luck.

Thanks for any advice.


Mar 11 '08 #3
re:
!Thanks for your reply but you're mistaken.

Do you think it possible that, perhaps, you don't grasp the subleties involved ?

You *cannot*, categorically, state that *any* changes made
to a global web.config are inheritable by all applications.

Some configuration parameters are reversible in a web.config. Others are not.
Some configuration parameters are exclusively for a single application. Others are global.

re:
!Many other changes I've made to the global web.config work fine.
!It's just this httpHandler that's acting up.

If you want to configure an httphandler so it works for all applications,
you should register it in the box's machine.config, not in the box's root web.config.

Registering an httphandler in the root web.config
will only allow the httphandler to work in the root web.

Here's an article which will make the concept(s) clearer to you:
http://www.15seconds.com/issue/020417.htm


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"mcqwerty" <mc******@nospam.nospamwrote in message news:33**********************************@microsof t.com...
Thanks for your reply but you're mistaken. You can affect all your
applications by editing the global web.config file. IIS even offers a button
labeled "Edit Global Configuration..." on the "ASP.NET" tab of a website
properites dialog.

Many other changes I've made to the global web.config work fine. It's just
this httpHandler that's acting up.

Thanks again.

"Juan T. Llibre" wrote:
>Web.config files are only valid for an application or a subdirectory of an application.

Any changes you make to the global web.config will be reflected
in the web root's configuration, and not in individual applications.

Make the changes in your application's web.config.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"mcqwerty" <mc******@nospam.nospamwrote in message news:CD**********************************@microsof t.com...
Hello,
I'm trying to enable an error handling package at the root of my web server
by editing this file:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CO NFIG\web.config

In the httpHandlers section I've added:

<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory,
Elmah, Version=1.0.9414.0, Culture=neutral, PublicKeyToken=42734318a98ac1df"
validate="true" />

This handlder works fine when declared in the application's local
web.config. But when I move it to the global web.config calls to 'elmah.axd'
cause a 404 error. There are many other httphandlers in global web.config
that seem to work fine. I've tried path variations starting with a tilde(~)
and asterix at both ends; no luck.

Thanks for any advice.



Mar 11 '08 #4
"Juan T. Llibre" wrote:
You *cannot*, categorically, state that *any* changes made
to a global web.config are inheritable by all applications.
True. That why I *never* stated any such thing.

many != any;

A little careful reading can prevent a lot of these pointless arguments.

Speaking of many vs. any. *You* are the one who wrote:
Any changes you make to the global web.config will be reflected
in the web root's configuration, and not in individual applications.
This is wrong. Apparently hearing that you're dismissive, non-responsive
answer contains a mistake launches you into a sarcastic, patronizing snit.

Thanks for mentioning machine.config and the link. But they're hardly worth
the grief, are they?
Mar 11 '08 #5
That thread is somewhat out of date. Older version of ELMAH used a handler
with an aspx extension, but the latest uses axd.

I'm using axd so I moved it before the *.axd handler. It is also
incidentally above the *.aspx handler, but I don't think that is required.
Mar 12 '08 #6

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

Similar topics

0
by: Simon John | last post by:
I have a program that consists of one main module and lots of small sub-modules. In the main module I open a text file and grep for a language setting, this language setting will then be used as...
0
by: beanweed | last post by:
BACKGROUND ---------- I have an ASP.NET application having two panels. In one panel, an XML document, transformed using xsl, is displayed. In the other panel are some controls that allow a user...
6
by: Ruslan | last post by:
Hello, I have to project: one ASN.NET project and another - Web Service in the same solution. I want to use the same web.config and global.asax files. Does it possible?
0
by: Søren Lund | last post by:
Hello, I have implemented a custom config section handler by implementing the IConfigurationSectionHandler interface. I have registered this handler in web.config and everything works fine ......
41
by: Miguel Dias Moura | last post by:
Hello, I am working on an ASP.NET / VB page and I created a variable "query": Sub Page_Load(sender As Object, e As System.EventArgs) Dim query as String = String.Empty ... query =...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
5
by: Eric Layman | last post by:
Hi everyone, Currently Im using Global.asax.vb to capture any errors and to send them via email to me. But I didn't get any emails when I purposely crash the web application. May I know what...
2
by: Glen Wells | last post by:
Hi, A client has 2 IIS websites both pointing at the same physical directory (2 separate IIS sites to allow 2 SSL certificates). On one site, an HTTP Handler defined in the web.config works OK,...
3
by: Lowell Alleman | last post by:
Here is the situation: I wrote my own log handler class (derived from logging.Handler) and I want to be able to use it from a logging config file, that is, a config file loaded with the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: 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...

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.