I am trying deploying my application to IIS server on windows 7 PC. The web address is
- I installed URL rewrite.
- Here is my web.config content
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/MyApp/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
My application runs very good using "ng serve" on my computer. When I deployed on IIS on windows 7 PC, the application cannot access resources like images, json files. I got 404 error. I think there is something wrong in my web.config file. The file, en.json, is located c:\inetpub\wwwroot\myapp\assets\i18n folder after it is deployed. Please help.
c:\inetpub\wwwroot\myapp
directory? Please share the details of how you have setup the Angular6 app in IIS – Mohsin Mehmoodbase
href tag to/myapp
angular.io/guide/deployment#base-tag – user184994