Organizational Research By

Surprising Reserch Topic

the element system webserver has invalid child element rewrite


the element system webserver has invalid child element rewrite  using -'asp.net,url-rewriting'


  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>


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

asked Oct 6, 2015 by shegokar.anjeet
0 votes
4 views



Related Hot Questions

1 Answer

0 votes

Possible duplicate of asp.net, url rewrite module and web.config

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

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/

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

For both versions, instructions are here.

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

For VS2012 and later, follow saoslab's post.

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.

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.

answered Oct 6, 2015 by vijaygupta1980

...