Search code examples
asp.nethttphandlerhttpmodule

which http module will execute first in asp.net if both web and machine config has same modules registered


I know asp.net runtime first checks webconfig then machine config.

if i add a custom http module in web config with the same name as that of machine config.... will .net engine ignore machine http module and will use web config modules ?

can this be the way to ignore one global asax method ?


Solution

  • web.config is not checked before machine.config, both are merged along with other config files and then a merged configuration file is used.

    If you are defining a handler with the same name as one that already exists in another config file, you will get a 500.19 error (Configuration data is invalid).

    You can easily test this on your workstation.