How to publish an Angular 2 application into Azure web app?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

How to publish an Angular 2 application into Azure web app?



I published my Angular 2 application into Azure web app by following this link. After that when I browse web app URL I am facing so many issues in zone.js file and also when I refresh my web app URL I got different errors.



Please see the below image for more information about my issues.



enter image description here



But my application is working in my local machine with out any issues. this is the code I wrote in 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>



Can you please tell me how to resolve those issues?





It looks like the server is to blame here. I visited the page and you get different results each time. You need to look to see if the server is limiting the number of requests it responds too or something of that nature.
– Teddy Sterne
Feb 27 '17 at 14:05





Still also I am facing same issues once again when I was published my angular app into azure web app.
– pradeep
Apr 25 '17 at 9:43





Couldn't reproduce. Please update your question with the new error you are facing.
– Teddy Sterne
Apr 25 '17 at 12:37





I resolved my errors, please see the below answer.
– pradeep
Apr 25 '17 at 12:50




1 Answer
1



Thanks Teddy Sterne, when I removed/comment the below lines of code from web.config. and published web app into azure it's working fine without any errors.


<!--<security>
<dynamicIpSecurity denyAction="NotFound">
--><!--<denyByConcurrentRequests enabled="true" maxConcurrentRequests="2"/>--><!--
<denyByRequestRate enabled="true" maxRequests="20" requestIntervalInMilliseconds="60000" />
</dynamicIpSecurity>
</security>-->



I think the problem with the above lines of code, because the code allows 20 requests per minute.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

Trying to Print Gridster Items to PDF without overlapping contents

Mass disable jenkins jobs