[英]“The Web server is configured to not list the contents of this directory” when loading the view Direclty (not when Naivgating from other page)
I'm extending an existing Angular-MVC.NET application. 我正在扩展现有的Angular-MVC.NET应用程序。 There are two features: transformations (exisitng) and embossing (the one I'm creating).
有两个功能:转换(exisitng)和浮雕(我正在创建一个)。 Both of them use provider classes that call an underlying logic.
它们都使用调用基础逻辑的提供程序类。
I copied all the logic for the transformation (Angular and MVC model and views), renamed evrthing accordingly, and created the new route for this feature in app.router.js
我复制了转换的所有逻辑(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");
});
}
]
}
});
Now I'm able to navigate without issues from the angular transformation controller to the embossing view by using $location.path('/embossing');
现在,我可以使用
$location.path('/embossing');
从角度变换控制器导航到浮雕视图,而不会出现问题$location.path('/embossing');
The thing that happens is that when I load directly the view by entering http://localhost:1623/embossing/
or if I hit enter on the browrser's URL bar after navegating from transformation (as I mentioned before) I get this error 发生的事情是,当我通过输入
http://localhost:1623/embossing/
embossing http://localhost:1623/embossing/
直接加载视图时,或者在对转换进行导航后(如我之前提到的那样)在浏览器的URL栏上按回车键时,出现此错误
How come I'm able to navigate to the view but when I load it directly I get that error? 我怎么能导航到视图,但是当我直接加载它时,我得到那个错误? Is there something that I'm missing?
有什么我想念的吗? What could be wrong?
有什么事吗
Thanks 谢谢
MVC and AngularJS Routing - 403.14 - Forbidden MVC和AngularJS路由-403.14-禁止
It got solved by renaming the "Embossing" folder (the one that contains EmbossingProvider.cs) 通过重命名“ Embossing”文件夹(包含EmbossingProvider.cs的文件夹)解决了该问题。
It seems that there cannot be a folder name as a route. 似乎不能有文件夹名称作为路由。 eg:
例如:
$routeProvider.when('/embossing', was conflicting with "Embossing" folder $ routeProvider.when('/ embossing',与“浮雕”文件夹冲突
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.