0
My project ran smoothly, when I needed to divide them into Areas. Then all my old controller (which ran perfectly) was migrated to a certain Area. The areas have been mapped and even updated Routeconfig. However, this error is giving.
HTTP Error 403.14 - Forbidden
The web server is configured not to list the contents of this directory.
Do you know how I can fix it without having to change specific permissions in the directory? Like, just by adjusting the project in visual studio.
Created area: "General"
URL: Controller: "Main" / Action: "Index"
Meu RouteConfig está assim:
routes.MapRoute(
name: "Default",
url: "Areas/Geral/{controller}/{action}/{id}",
defaults: new { controller = "Principal", action = "Index", id = UrlParameter.Optional }
Which URL are you trying to access? What is the name of the areas you created? What is the name of the controller that should receive the request? He’s within what area?
– Jéf Bueno
jbueno, see if the update I made answers your question.
– Bruno Heringer
And what is the URL that gives this 403 error?
– Jéf Bueno
It would be the starting URL.
http://localhost:51454/
where it is configured in route config toController: "Principal" , Action: "Index"
– Bruno Heringer
Tried ? defaults: new { area = "General", controller = "Main", action = "Index", id = Urlparameter.Optional }
– LP. Gonçalves
LP.Gonçalves, gives the same error.
– Bruno Heringer
@Brunoheringer Area set in default
– Jéf Bueno
blz... I even managed to evolve, but now the error is that "The view 'Index' or its master was not found or no view engine Supports the searched Locations. The following Locations Were searched: ~/Views/Login/Index.cshtml"
– Bruno Heringer