1
votes

I have a project on which I tested stuff related to this experimentation: .NET MVC - Controller/View and physical path?

Now I can't display a normal MVC view:

On http://mvc4testsomething/Folder/Index , the view is displayed. On http://mvc4testsomething/Folder/, I get "HTTP Error 403.14 - Forbidden" error.

Here's are ALL the current routes: routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default",
            "{controller}/{action}/{id}",
            new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );

        routes.MapRoute(
            "Folder",
            "Folder/{action}/{id}",
            new { controller = "Folder", action = "Index", id = UrlParameter.Optional }
        );

web.config has:

<directoryBrowse enabled="false" showFlags="Date, Time, Size, Extension" />

If I change directoryBrowse to true in web.config, it simply displays the folder content, not the view.

Than you for your help.

1
Move the Folder Route before the Default route. - Nilesh
Thank you but this doesn't change anything. - TTT
Have you seen how Areas work in MVC? I think you need something like that. - Nilesh

1 Answers

0
votes

Ok I found it. I had to delete the physical "Folder" folder. But then I back to the start of my experimentation (the other question linked in this topic).