HTTP错误500.52-URL重写模块错误 [英] HTTP Error 500.52 - URL Rewrite Module Error

查看:84
本文介绍了HTTP错误500.52-URL重写模块错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

URL路由工作正常,但是当我在IIS网站中创建应用程序时,应用程序停止运行并出现错误

HTTP错误500.52-URL重写模块

此规则正常运行(

我在Google上进行了搜索,但没有找到解决方案.需要专家指导.谢谢

解决方案

您的配置错误说:

无法添加类型为规则"的重复集合条目,且其唯一键属性名称"设置为"AngularJS路线"

您可能需要更改您的规则名称之一才能使其正常工作,例如:

 <规则名称="AngularJS路线" stopProcessing ="false"> [...]</rule>< rule name ="AngularJS App Routes" stopProcessing ="false"> [...]</rule> 

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>

这篇关于HTTP错误500.52-URL重写模块错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆