0

I have created an ASP.NET WebApplication with Internet Template.

I have NOT modified anything in the RouteConfig class, meaning I am using default Route table only.

When I type the following URL insde the browser

http://localhost:8416/

Index view is retuning insde HomeController without any problem.

But, if I type the following URL

http://localhost:8416/EstimationTracker/

I am gettinger the following error.

HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.

But, if I type the following URL, view is returning fine (just appending /Index to the above URL).

http://localhost:8416/EstimationTracker/Index

My doubt is why Index action method is being not recognized as the default action method inside EstimationTracker controller or is something else happening?

For easy referece, the following is the code inside inside RouteConfig.cs file.

            routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
4

2 回答 2

1

在项目根文件夹中创建的EstimationTracker文件夹导致了问题。

问题中的错误意味着静态文件处理程序接受了请求。

我从这里得到了答案。

于 2013-06-11T01:31:40.650 回答
0

Is there a folder called EstimationTracker in you application's root folder?

于 2013-06-09T08:58:29.527 回答