Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

url rewrite with visual studio 2012

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.

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

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.

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?

like image 936
Ami Avatar asked Oct 29 '12 11:10

Ami


People also ask

What is the difference between URL Rewrite and redirect?

Simply put, a redirect is a client-side request to have the web browser go to another URL. This means that the URL that you see in the browser will update to the new URL. A rewrite is a server-side rewrite of the URL before it's fully processed by IIS.

What is rewrite URL in IIS?

About the URL Rewrite module The Microsoft URL Rewrite Module 2.0 for IIS 7 and above enables IIS administrators to create powerful customized rules to map request URLs to friendly URLs that are easier for users to remember and easier for search engines to find.


1 Answers

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.

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

like image 183
Valášek Altair Avatar answered Dec 23 '22 14:12

Valášek Altair