开发者

IIS7: URL Rewrite not working when debugging with Visual Studio

开发者 https://www.devze.com 2023-01-06 02:30 出处:网络
I have set up some User Friendly URL rules in IIS7 using the URL Rewrite module. This works perfectly on IIS7.

I have set up some User Friendly URL rules in IIS7 using the URL Rewrite module. This works perfectly on IIS7.

However, when I try to debug the site, the webserver instance that Visual Studio creates doesn't seem to obey the rewrite rules.

For example,

http://localhost/friendly-url

works on IIS7, but

http://localhost:1800/friendly-url

returns a 404 error when debugging with Visual Studio 2008. Since the rewrite rules are present in web.config, I would have expected Visual Studio to obey them开发者_高级运维?

Wild Thing


Cassini doesn't do URL rewriting. You might want to look at the recently announced IIS Express version which will.

Quoting from the linked article:

The downside with the ASP.NET Developer Server, though, is that it does not support a full set of web-server features. For example, it doesn’t support SSL, URL Rewriting Rules (like the SEO URL Rewrite Rules I blogged about here), Custom Security Settings, and other richer features now offered with IIS 7.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号