Reputation: 654
I need some help in Deployment of Angular Application on local IIS Server .
ISS version : 10
i have deployed my Angular Application on IIS and its working fine but when i am adding web.config file in it then its giving Error . local Host URL is : http://localhost/eportal . URL rewrite extension is also installed .
when adding this config file then Application Gives error .
Here is Web Config File
<?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="/eportal">
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Upvotes: 0
Views: 9681
Reputation: 3502
I guess, you need to provide the file name in the action url
and your action type tag is not closed in xml
e.g.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AngularJS" 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="/eportal/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Upvotes: 2