4

There is one in the Views folder.

And there is another in the root of the app.

I want to register a custom handler and i cant understand where the code should go. I'm running IIS7 in Integrated Mode so I have to add a <handlers> tag to the <system.webServer> but when I'm looking at the web.config at the Views folder I see that it uses a <httpHandlers> under <system.web> tag.

So two questions: 1. why are there two web.config files in an mvc application? 2. where and in what way I should register my custom HTTP Handler?

Mortalus
  • 10,574
  • 11
  • 67
  • 117
  • possible duplicate of [why are there 2 web.config files](http://stackoverflow.com/questions/1355353/why-are-there-2-web-config-files) – neminem Oct 18 '13 at 15:19

1 Answers1

5

You should register it in root config. Views config is for configure views, for example: add namespace for all views and etc.

Community
  • 1
  • 1
webdeveloper
  • 17,174
  • 3
  • 48
  • 47