asp.net,url重写模块和web.config

Chr*_*oph 31 asp.net url rewrite module web-config

我在IIS7(Vista)上使用带有.NET 3.5的ASP.net和Microsoft的URL重写模块.

这意味着,我有一个

<system.webServer>
    <rewrite>...</rewrite>
    ...
</system.webServer>
Run Code Online (Sandbox Code Playgroud)

web.config中的部分,但我得到一个警告,在system.webServer中,不允许使用元素"rewrite".

如何配置我的系统允许(甚至可能有Intellisense)在web.config的重写部分?

谢谢Christoph

Jon*_*and 25

我能够在Visual Studio 2010中使用它.

从Ruslan的帖子开始,下载2.0 IntelliSense文件.然后,只要按照他事先发布的指示在这里.我最后做的就是按照Ruslan的指示运行以下命令:

C:\download_directory\rewrite2_intellisense>cscript UpdateSchemaCache.js

正如克里斯托弗在他的评论中指出,确保您更换VS90COMNTOOLSVS100COMNTOOLS在UpdateSchemaCache.js如果你正在使用Visual Studio 2010中运行上述命令.

我不需要重新启动Visual Studio.我<rewrite>只将该部分添加到适用的Web.config转换文件中,因为它在主Web.config中打破了本地调试.

  • 嗨乔恩,谢谢你的链接.在vs2010中运行良好,但要注意,如果你使用vs2010,你需要在UpdateSchemaCache.js中将"VS90COMNTOOLS"更改为"VS100COMNTOOLS"(其他用户的提示:-)) (4认同)