使用 Visual Studio 2012 重写 url [英] url rewrite with visual studio 2012

查看:23
本文介绍了使用 Visual Studio 2012 重写 url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 url 重写模块与 VS 2012 上的 MVC 应用程序一起使用.我已经使用 web 平台 4.0 安装了该模块,遵循 Ruslan 的博客 post,根据评论更新了他的js脚本(特别是Brant Burnett 10月19日的最后一个,脚本成功执行.我检查了DotNetConfig.xsd,一切正常.

I'm trying to use the url rewrite module with an MVC application on VS 2012. I've installed the module using web platform 4.0, followed Ruslan's blog post, updated his js script according to the comments (specifically the last one by Brant Burnett on Oct 19th, and the script executed successfully. I checked the DotNetConfig.xsd and everything looks fine.

如果我打开 IIS 管理控制台,我会看到 Url Rewrite 模块并且一切正常.

If I open IIS management console I see the Url Rewrite module and everything looks ok.

我创建了一个简单的 MVC 解决方案(使用默认的 home/account 控制器),当我添加最简单的 ToLowerCase 规则(也从 Ruslan 的博客中复制)时,我会在标签下看到蓝色波浪线和 http 500.19尝试执行.重新启动等没有帮助.同样重要的是我使用 IIS express 7.5.

I create an simple MVC solution (with the default home/account controller), and when I add the simplest ToLowerCase rule (also copied from Ruslan's blog), I get the blue squiggly line under the tag and an http 500.19 if I try to execute. rebooting, etc. does not help. also important to mention I use IIS express 7.5.

同样的程序在运行 VS 2010 的机器上对我来说很好,url 重写没有问题.

the same procedure worked for me fine on a machine running VS 2010, url rewriting worked without a problem.

有人知道会出什么问题吗?进一步分析需要什么信息?为什么智能感知不工作并且重写模块被识别?

anyone knows what could go wrong? what info is needed for further analysis? why isn't intellisense working and the rewrite module recognized?

推荐答案

问题在于.NET Framework的版本,每个版本都有自己的配置智能感知文件.额外的麻烦是 4.5 的文件不在 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas\ 中,如 DotNetConfig45.xsd,但在附加文件夹 1033 中.

The problem lies in version of .NET Framework, each version has its own config intellisense file. Additional hassle is that the file for 4.5 isn't in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas\, as DotNetConfig45.xsd, but in additional folder 1033.

这里我为 VS 2012 和 .NET 3.5、4.0 和 4.5 更新了 RuslanY 的安装脚本:http://pastebin.com/8GGGHTBL

Here I updated RuslanY's setup script for VS 2012 and .NET 3.5, 4.0 and 4.5: http://pastebin.com/8GGGHTBL

这篇关于使用 Visual Studio 2012 重写 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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