Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error 500.19 - Internal Server Error after hosting the Angular 4 app

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>
like image 424
Vinil Avatar asked May 31 '18 03:05

Vinil


1 Answers

Your IIS is missing URL Rewrite module.

You can download and install it here from microsoft: https://www.iis.net/downloads/microsoft/url-rewrite

like image 158
penleychan Avatar answered Sep 19 '22 17:09

penleychan