URL routing is working fine but when i create application in IIS website, application stop working with error
HTTP Error 500.52 - URL Rewrite Module
This rule is working fine ( http://abcd/ )
<rule name="AngularJS Routes" stopProcessing="false">
<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="/"/>
</rule>
But when i change it application it gives error ( http://abcd/app/ )
<rule name="AngularJS Routes" stopProcessing="false">
<match url="(^app/.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/app/"/>
</rule>
I have searched on google but found no solution. Expert guides is need.Thanks
Your config error says:
Cannot add duplicate collection entry of type 'rule' with unique key attribute 'name' set to 'AngularJS Routes'
You'll probably need to change one of your rule
name to make it work, for example:
<rule name="AngularJS Routes" stopProcessing="false">[...]</rule>
<rule name="AngularJS App Routes" stopProcessing="false">[...]</rule>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.