首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何将Angular 2应用程序发布到Azure web应用程序?

如何将Angular 2应用程序发布到Azure web应用程序?
EN

Stack Overflow用户
提问于 2017-02-27 21:56:14
回答 1查看 295关注 0票数 1

我通过遵循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>

我如何解决这些问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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个请求。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42487554

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档