I have hosted my Angular 4 application in server system ,Initially I got 404 error So I have added a web.config file with my production build folder .Now I got this error.
But the app is running fine on my local system ,it throws error the server system.and I have tried some other systems which runs on win7,win10 but it's not running always shows the error of 500.19.
I spend hours to solve this ,referred all the post in in stackoverflow which related to my post but nothing is worked.
can anyone help me to solve this .
Error Page :
enter image description here
Web.Config
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AngularJS Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/eCommerceWebsite" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Your IIS is missing URL Rewrite module.
You can download and install it here from microsoft: https://www.iis.net/downloads/microsoft/url-rewrite
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With