Using Url Rewrite Model In IIS7 and Display Error ('system.webServer' has invalid child element 'rewrite' 。。。)
2010-08-22 16:18
761 查看
报错信息:
'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
解决方案:
If you ever tried to write or modify rewrite rules in web.config file by using Visual Studio 2008 XML Editor, you may have noticed that the Visual Studio XML IntelliSense does not work for all URL Rewrite Module configuration elements. This is because the XML schema for <rewrite> element is not registered in Visual Studio Schema Cache. This post provides the instructions on how to register URL Rewrite schema with Visual Studio to enable IntelliSense support.
To enable IntelliSense support for URL Rewrite 1.1 follow these steps:
Step 1: Download the URL Rewrite schema from the location below:
VS IntelliSense for URL Rewrite
Disclaimer: The schema file and the helper script file contained in this package are provided by me and not by Microsoft. The are not officially supported by Microsoft. Use them at your own risk.
Step 2: Extract the content of the file to a directory of your choice, for example C:\rewrite_vsintellisense\
Step 3: Start the elevated privilege command line window by typing “cmd” in the search bar of the Windows Start Menu and then right clicking the “cmd” item in the search result and selecting “Run As Administrator”.
Step 4: In the command line window type the following:
cd \rewrite_intellisense
Replace the path if you unpacked the files into a different location
cscript UpdateSchemaCache.js
You should see the output as below:
Check that the XML IntelliSense in Visual Studio XML editor works now:
In case you want to restore back the original XML schema used by Visual Studio, here is how you can do it:
cd “%ProgramFiles%\Microsoft Visual Studio 9.0\Xml\Schemas"
move DotNetConfig_beforeRewrite.xsd DotNetConfig.xsd
'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
解决方案:
If you ever tried to write or modify rewrite rules in web.config file by using Visual Studio 2008 XML Editor, you may have noticed that the Visual Studio XML IntelliSense does not work for all URL Rewrite Module configuration elements. This is because the XML schema for <rewrite> element is not registered in Visual Studio Schema Cache. This post provides the instructions on how to register URL Rewrite schema with Visual Studio to enable IntelliSense support.
To enable IntelliSense support for URL Rewrite 1.1 follow these steps:
Step 1: Download the URL Rewrite schema from the location below:
VS IntelliSense for URL Rewrite
Disclaimer: The schema file and the helper script file contained in this package are provided by me and not by Microsoft. The are not officially supported by Microsoft. Use them at your own risk.
Step 2: Extract the content of the file to a directory of your choice, for example C:\rewrite_vsintellisense\
Step 3: Start the elevated privilege command line window by typing “cmd” in the search bar of the Windows Start Menu and then right clicking the “cmd” item in the search result and selecting “Run As Administrator”.
Step 4: In the command line window type the following:
cd \rewrite_intellisense
cd \rewrite_intellisense
Replace the path if you unpacked the files into a different location
cscript UpdateSchemaCache.js
cscript UpdateSchemaCache.js
You should see the output as below:
Check that the XML IntelliSense in Visual Studio XML editor works now:
In case you want to restore back the original XML schema used by Visual Studio, here is how you can do it:
cd “%ProgramFiles%\Microsoft Visual Studio 9.0\Xml\Schemas"
move DotNetConfig_beforeRewrite.xsd DotNetConfig.xsd
相关文章推荐
- error:unknown file system and invalid arch independent ELF magic
- [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLBodyElement.appendChild]" nsresult: "0x80004003
- (原創) 如何解決『Error: More than one programming cable found in available hardware list --use--list option to display available hardware list and specify correct cableprogramming』錯誤訊息? (SOC) (Nios II) (μClinux) (DE2) (DE2-70)
- EF 新增数据时提示it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element
- HTML Parsing Error: Unable to modify the parent container element before the child element is closed
- Column 2 has invalid name and/or length的解决
- The connection to adb is down, and a severe error has occured完整解决办法
- NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be mad
- The connection to adb is down, and a severe error has occured.
- 问题一:The connection to adb is down, and a severe error has occured...........
- 问题解决The connection to adb is down, and a severe error has occured.
- The connection to adb is down, and a severe error has occured.
- 启动android模拟器时.有时会报The connection to adb is down, and a severe error has occur
- android The connection to adb is down, and a severe error has occured
- [已解决]讯飞语音android集成时遇到Error:(35) Tag <uses-permission> attribute name has invalid character ' '.
- The connection to adb is down, and a severe error has occured.
- android The connection to adb is down, and a severe error has occured
- The connection to adb is down, and a severe error has occured.
- The connection to adb is down, and a severe error has occured.
- The connection to adb is down, and a severe error has occured.