所述组件> system.webServer具有无效子>元素“改写” [英] The element > system.webServer' has invalid child > element 'rewrite'

查看:855
本文介绍了所述组件> system.webServer具有无效子>元素“改写”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

警告1元素
  system.webServer具有无效子
  元素改写。可能的名单
  预计元素:'ASP,缓存,CGI,
  defaultDocument,directoryBrowse,
  globalModules,处理程序
  httpCom pression,httpErrors,
  httpLogging,httpProtocol,
  HTT predirect,httpTracing,
  isapiFilters,模块,odbcLogging,
  安全,serverRuntime中,
  serverSideInclude,staticContent,
  跟踪,urlCom pression,验证,
  管理'。 D:\\ PROJEKTI \\ FoodOrder \\ FoodOrder \\ Web.config文件185 4 FoodOrder

Warning 1 The element 'system.webServer' has invalid child element 'rewrite'. List of possible elements expected: 'asp, caching, cgi, defaultDocument, directoryBrowse, globalModules, handlers, httpCompression, httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing, isapiFilters, modules, odbcLogging, security, serverRuntime, serverSideInclude, staticContent, tracing, urlCompression, validation, management'. D:\PROJEKTI\FoodOrder\FoodOrder\Web.config 185 4 FoodOrder

code:

system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="ScriptModule" />
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated" />
            <remove name="ScriptHandlerFactory" />
            <remove name="ScriptHandlerFactoryAppServices" />
            <remove name="ScriptResource" />
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </handlers>
        <rewrite>
            <rewriteMaps>
                <rewriteMap name="StaticRewrites">
                    <!--<add key="/Default.aspx" value="/Default.aspx" />-->
                </rewriteMap>
            </rewriteMaps>
            <rules>

页的作品,但我总是得到这样的警告,当我发布页我得到错误发布的becouse这...

page works but i always get warning of this and when i publish page i get publish error becouse of this...

推荐答案

asp.net,URL重写模块和web.config中

这发生在Visual Studio的IntelliSense不找到有关架构文件重写模块的信息。因此,我们需要添加重写部分架构在一个文件中明确:DotNetConfig.xsd

This happens when Visual Studio IntelliSense doesn't find information about rewrite module on schema file. Hence we need to add schema for rewrite section in a file specifically: DotNetConfig.xsd

鲁斯兰提供重写非官方的架构。对于Visual Studio 2010中,请从他的页面下载XML模式:<一href=\"http://ruslany.net/2010/04/visual-studio-xml-intellisense-for-url-rewrite-2-0/\">http://ruslany.net/2010/04/visual-studio-xml-intellisense-for-url-rewrite-2-0/

Ruslan provides unofficial schema for rewrite. For Visual Studio 2010, please download xml schema from his page: http://ruslany.net/2010/04/visual-studio-xml-intellisense-for-url-rewrite-2-0/

有关早期版本从这里下载:
<一href=\"http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1/#comment-1402\">http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1/#comment-1402

For earlier versions download from here: http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1/#comment-1402

有关两个版本,说明<一个href=\"http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1/#comment-1402\">here.

有关VS2010记得替换%VS90COMNTOOLS%%VS100COMNTOOLS%

For VS2010 remember to replace %VS90COMNTOOLS% with %VS100COMNTOOLS%

有关VS2012和以后,遵循<一个href=\"http://tech.saoslab.com/post/2011/12/24/Visual-Studio-IntelliSense-not-working-with-rewrite-module\">saoslab's帖子。

For VS2012 and later, follow saoslab's post.

如果你不想使用ruslany的脚本,你仍然可以使用重写模块。在这种情况下,你仍然可以修改web.config中添加重写部分出来的Visual Studio。

If you do not want to use ruslany's script you can still use rewrite module. In that case, you still can modify web.config to add rewrite section out of visual studio.

有关IIS原始重写模块来自微软:<一href=\"http://www.iis.net/downloads/microsoft/url-rewrite\">http://www.iis.net/downloads/microsoft/url-rewrite和它们所支持。 ruslany的剧本只允许在Visual Studio支持,使VS识别。

Original rewrite module for IIS comes from Microsoft: http://www.iis.net/downloads/microsoft/url-rewrite and supported by them. ruslany's script just enables support in Visual Studio so that VS recognizes it.

这篇关于所述组件&gt; system.webServer具有无效子&GT;元素“改写”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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