asp.net、url重写模块和web.config [英] asp.net, url rewrite module and web.config

查看:28
本文介绍了asp.net、url重写模块和web.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 IIS7 (Vista) 上使用 ASP.net 和 .NET 3.5 以及来自 Microsoft 的 URL 重写模块.

i'm using ASP.net with .NET 3.5 on IIS7 (Vista) with the URL Rewrite Module from Microsoft.

这意味着,我有一个

<system.webServer>
    <rewrite>...</rewrite>
    ...
</system.webServer>

web.config 中的部分,但我收到警告,在 system.webServer 中不允许元素重写".

section within the web.config, but i get a warning, that within the system.webServer the element "rewrite" is not allowed.

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

How can i configure my system to allow (and maybe even have Intellisense) on the rewrite-part of the web.config?

谢谢克里斯托夫

推荐答案

我能够在 Visual Studio 2010 中实现此功能.

I was able to get this working in Visual Studio 2010.

从 Ruslan 的帖子开始这里 并下载 2.0 IntelliSense 文件.然后,只需按照他之前发布的说明 这里.我最后所做的只是按照 Ruslan 的指示运行以下命令:

Start with Ruslan's post here and download the 2.0 IntelliSense file. Then, just follow the directions he posted previously here. All I ended up doing was running the following command as Ruslan instructs:

C:download_directory ewrite2_intellisense>cscript UpdateSchemaCache.js

正如 Christoph 在他的评论中指出的那样,如果您使用的是 Visual Studio 2010,请确保在运行上述命令之前将 UpdateSchemaCache.js 中的 VS90COMNTOOLS 替换为 VS100COMNTOOLS.

As Christoph points out in his comment, make sure you replace VS90COMNTOOLS with VS100COMNTOOLS in UpdateSchemaCache.js before running the above command if you are using Visual Studio 2010.

我不需要重新启动 Visual Studio.我仅将 部分添加到适用的 Web.config 转换文件中,因为在主 Web.config 中使用它会破坏本地调试.

I did not need to restart Visual Studio. I added the <rewrite> section only to the applicable Web.config transformation files, as having it in the main Web.config breaks local debugging.

这篇关于asp.net、url重写模块和web.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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