我通过遵循this link将我的Angular 2应用程序发布到Azure web应用程序中。在那之后,当我浏览网页应用程序网址时,我在zone.js文件中遇到了很多问题,而且当我刷新我的网页应用网址时,我得到了不同的错误。
有关我的问题的更多信息,请参见下图。
但是我的应用程序在我的本地机器上运行得很好,没有任何问题。这是我用index.cshtml写的代码
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Todo List Angular2 Sample</title>
<link href="app/app.component.css" rel="stylesheet" />
<link href="node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<!-- Secure Hash Algorithm -->
@*<script src="js/jsSHA-master/src/sha.js"></script>*@
<script>
window.config = {
apiBaseUrl: '@System.Configuration.ConfigurationManager.AppSettings["toDoListAPIURL"]'
};
</script>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<body>
<my-app>Loading AppComponent content here ...</my-app>
</body>
</html>
我如何解决这些问题?
发布于 2017-04-25 18:49:51
当我从web.config中删除/注释以下代码行时,感谢Teddy Sterne。并将web应用程序发布到azure中,运行正常,没有任何错误。
<!--<security>
<dynamicIpSecurity denyAction="NotFound">
--><!--<denyByConcurrentRequests enabled="true" maxConcurrentRequests="2"/>--><!--
<denyByRequestRate enabled="true" maxRequests="20" requestIntervalInMilliseconds="60000" />
</dynamicIpSecurity>
</security>-->
我认为以上几行代码的问题所在,因为代码允许每分钟20个请求。
https://stackoverflow.com/questions/42487554
复制相似问题