"The Web server is configured to not list the contents of this directory" 直接加载视图时(不是从另一个页面导航时)

"The Web server is configured to not list the contents of this directory" when loading the view Direclty (not when Naivgating from other page)

我正在扩展现有的 Angular-MVC.NET 应用程序。 有两个功能:转换(exisitng)和压花(我正在创建的)。他们都使用调用底层逻辑的提供程序 类。

我复制了所有转换逻辑(Angular 和 MVC 模型和视图),相应地重命名了 evrthing,并在 app.router.js

中为此功能创建了新路由
            $routeProvider.when('/embossing', {
                templateUrl: 'app/views/embossing.html',
                params: { test: "hola" },
                resolve: {
                    deps: [
                        "$ocLazyLoad", function (a) {
                            debugger;
                            return a.load([jqload.c3, jqload.sparkline])
                                .then(function () {
                                    return a.load({
                                        name: "app.directives",
                                        files: ["app/scripts/lazyload/directives/sparkline.directive.js"]
                                    });
                                })
                                .then(function () {
                                    return a.load("angular-c3");
                                })
                                .then(function () {
                                    return a.load("easypiechart");
                                });
                        }
                    ]
                }
            });

现在我可以通过使用 $location.path('/embossing');

发生的事情是,当我通过输入 http://localhost:1623/embossing/ 直接加载视图时,或者如果我在从转换导航后(如前所述)在浏览器的 URL 栏上按回车键,我得到这个错误

为什么我能够导航到视图,但是当我直接加载它时却出现该错误? 有什么我想念的吗?有什么问题吗?

谢谢

MVC and AngularJS Routing - 403.14 - Forbidden

通过重命名 "Embossing" 文件夹(包含 EmbossingProvider.cs 的文件夹)解决了这个问题

好像不能有文件夹名作为路径。例如:

$routeProvider.when('/embossing', 与 "Embossing" 文件夹冲突