Reputation: 940
I know I am not the first to ask this question here ,I could find lot of solutions related to my issue but nothing is solved my issue .,
Image :
Web.config
<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="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
index.html
<base href ="/eCommerceWebsite/">
Physical Path in IIS
C:\eCommerceWebsite
Can anyone tell me where I did the mistakes and what I need to change here
Edit :
Image1:
Image 2:
Updated web.config
<?xml version="1.0" encoding="UTF-8"?>
<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>
Edit 2 :
Upvotes: 3
Views: 11239
Reputation: 490
Just to keep in register here. You need to install the IIS URL Rewrite, this is an IIS Extension to your <rewrite> routes works. This extension fixed my problem with IIS.
Upvotes: 13
Reputation: 4236
For your Application Pool set "Enable 32 bit Applications" to true
Now go to C: drive right click on your website directory eCommerceWebsite and then click Security and then edit.
Click Add and then in the object name you have to type in the AppPool identity user which has the format "IIS AppPool{AppPoolName}" e.g. in screenshot I have "IIS AppPool\DefaultAppPool" for defaultAppPool. Next click check names and then assign "Modify" permissions.
Upvotes: 3