Angular ABP application not working after being deployed to IIS server, no errors in console

Viewed 37

I have Angular frontend and .NET backend built with ABP framework. After deployment backend is working fine but frontend app just loads index.html file and doesn't go behind that (also some ngx datatable css and some other css stuff).

Also, I don't get any errors in console.

My web.config file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<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="./index.html" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>

</configuration>

Note on that it is working perfectly in development.

I built it using ng build and copied all files to inetpub/www folder.

2 Answers

try this

<action type="Rewrite" url="/" />

Solved.

Problem was in IdentityServer. I created project where IdentityServer was not separated into different project. So for some reason user could not be authenticated automatically after deployment. After few changes to configuration on backend and frontend I added it directly to database and now it works.

Related