1

I've read a post about httpHandlers and httpModules in ASP.NET and it said that there are such nodes (<httpModules> and <httpHandlers>) defined by default inside machine.config but when I looked they are not there. I've searched the machine.config at path "$WINDOWS$\Microsoft.NET\Framework\$VERSION$\CONFIG".

The only references are these 2 lines:

<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

I am using Win7, IIS7 and .NET version 4.5

yagni
  • 23
  • 5
  • You must look the `web.config`, not the machine (on the mention directory) – Aristos Jun 05 '14 at 10:15
  • Thank you, they are there indeed. But what is the role of the machine.config file then ? Does it uses or references the web.config you mentioned ? – yagni Jun 05 '14 at 11:06

2 Answers2

0

You can get a list of modules using appcmd if that's all you're trying to do. appcmd list config site/vdir -section:"system.web/httpModules"

Wonko
  • 331
  • 1
  • 5
  • Thank you, this does allow me to see those nodes, but for a specific site, right? What I was looking for was the global configuration. – yagni Jun 05 '14 at 11:01
  • Yes, Aristos directed me to that file and seems to answer my question. – yagni Jun 06 '14 at 08:09
0

The machine configuration file, Machine.config, contains settings that apply to an entire computer. It defines such common configSections as <httpModules> and <httpHandlers> for custom modules and custom handlers so that you do not need to declare them on each website on your machine separately but directly use as

<httpModules>
   <add name="..." type="..." /> 
</httpModules>

There are no custom modules/handlers defined for an entire machine configuration and by default, the machine.config file has no <httpModules> and <httpHandlers>

user2316116
  • 6,726
  • 1
  • 21
  • 35
  • Thank you for clearing things out, perhaps the article was not documented enough because it stated: "_In fact, you can see a precise list of what modules are used by default by going to the machine.config file (located in the $WINDOWS$\Microsoft.NET\Framework\$VERSION$\CONFIG directory) and searching for the element._" – yagni Jun 05 '14 at 11:16