asp.net – 元素’system.webServer’有无效的子元素’重写’ 我
我在IIS7中有很多重写规则,比如删除尾部的斜杠,标点的URL,小写字母等等。 IIS改变了我的web.config,一切都在网站上运行正常,就像它应该的一样。但是在Visual Studio web.config中,打开< rewrite>语句以蓝色加下划线,在VS的底部,它表示元素“system.webServer”具有无效的子元素“重写”。但这是IIS如何做…我没有手动这样做。我应该关心这个VS错误,还是应该像现在一样离开,因为它是如何工作的?
以下是我的web.config示例: <system.webServer> <rewrite> <-------------------- this is underlined in squiggly blue <rules> <rule name="RemoveASPX" enabled="true" stopProcessing="true"> <match url="(.*).aspx" /> <action type="Redirect" url="{R:1}" /> <conditions logicalGrouping="MatchAll"> <add input="{URL}" pattern="(.*)/default.aspx" negate="true" /> <add input="{URL}" pattern="(.*)/admin/*" negate="true" /> <add input="{URL}" pattern="(.*)/desktopmodules/*" negate="true" /> </conditions> </rule> 约有5或6个其他规则,然后关闭< /system.webServeru0026gt;最后。 解决方法
这里更新的模式为我解决了这个问题。
http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1/ 确保更改VS2010的脚本:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net – Viewstate压缩问题
- asp.net-mvc-3 – 使用Razor在Telerik MVC3网格中选择过滤器
- 有人可以向我介绍asp.net路由语法吗?
- webmatrix – ASP.NET页面中的_PageStart.cshtml与_AppStar
- asp.net – 设置值时页面移位 – 我的代码或最新版本的Chro
- asp-classic – 经典的ASP gremlims,每当使用HTML特殊字符时
- asp.net-mvc – 后退按钮不会导致回发到MVC中的控制器操作
- 如何为ASP.NET WebAPI 2中使用路由属性的特定控制器添加Mes
- ASP.NET MVC 2 – 设置Html.Form的ID
- asp.net-core-1.0 – ASP.NET Core 1.0中的package.json