The settings should go into the web.config at the application root. The web.config in the views folder is there to block direct access to the view aspx pages which should only get served through controllers.
OR,
OR,
The web.config in the Views directory just has one significant entry, which blocks direct access:
<add path="*" verb="*"
type="System.Web.HttpNotFoundHandler"/>
This is so someone cannot manually try to go to
http://www.yoursite.com/views/main/index.aspx
and load the page outside the MVC pipeline.
OR,
/Views/Web.config
This is not your application’s main web.config file. It just contains a directive instructing the web server not to serve any *.aspx files under /Views (because they should be rendered by a controller, not invoked directly like classic WebForms *.aspx files). This file also contains configuration needed to make the standard ASP.NET ASPX page compiler work properly with ASP.NET MVC view template syntax.
/Web.config
This defines your application configuration.
This is from the book Pro ASP.NET MVC Framework
No comments:
Post a Comment