Is there anything special about the MVC called properties?

After trying to solve this problem for centuries, think about a routing conflict, etc. - From the very beginning I started a separate project.

It seems that when you try to access the root site ( http://site/properties ), an MVC controller called "properties" always returns a 403.14 forbidden message, however other pages work ( http://site/properties/index )

It works great as a controller in an area, but I just can't create it on the main site.

I was wondering if anyone knows why and how best to do this?

+6
source share
2 answers

In addition to DavidG answer .

When you publish a project, the compiled assembly does not have a Properties folder. To solve the problem locally during development, you can set RouteExistingFiles to true so that ASP.NET routing will handle all requests.

 public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.RouteExistingFiles = true; routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } 
+3
source

The problem is that your project already contains a folder called Properties , which is mainly used for the AssemblyInfo.cs file, but there are other materials there. A mechanism used to allow which files to send to a client suspend routing files and folders. therefore, the URL http://site/properties trying to upload server-side content that is ultimately blocked.

+2
source

All Articles