I have deployed node.js app to iis using iisnode.When I browse my app,I see config error as follows Cannot add duplicate collection entry of type 'rule' with unique key attribute 'name' set to 'node'
I suspect web.config is loaded twice to iis. I see the folder under C:/Program Files/iisnode/www is where source files are there. This is loaded twice
I have attached pics for clear understanding
web.config
<configuration>
<system.web>
<customErrors mode="Off"/>
<httpCookies httpOnlyCookies="true" />
</system.web>
<system.webServer>
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="HTTP to Prod HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
<rule name="infrc">
<match url="/*" />
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Move the application folder to another new folder or drive.
Regards, Jalpa