【发布时间】:2017-02-11 13:27:19
【问题描述】:
我收到错误消息“无法访问请求的页面,因为该页面的相关配置数据无效。”当我在 WCF 应用程序的 web.config 中使用重写元素时。
<rewrite>
<rules>
<rule name="Rewrite Index">
<match url="myApplicaiton/Healthcheck.aspx" />
<action type="Redirect" url="HealthCheck.aspx" />
</rule>
</rules>
</rewrite>
如果请求 url 包含“myApplication”http://localhost/myApplication/HealthCheck.aspx,我想要重定向(服务器重定向)。您能否告诉我上述配置中是否有任何问题,并让我知道是否有任何其他方式对 WCF 应用程序 web.config 中的静态文件进行重定向
【问题讨论】:
-
您需要为 IIS 安装 URL Rewrite:iis.net/download/URLRewrite
标签: asp.net asp.net-mvc wcf asp.net-web-api