URL路由不工作在IIS 6 [英] Url Routing is not working on IIS 6

查看:135
本文介绍了URL路由不工作在IIS 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

URL路由不工作在IIS 6(使用System.Web.Routing命名空间)

Url Routing is not working on IIS 6. (using System.Web.Routing Namespace)

如果我通过VS 2008,然后它工作正常运行。 如果我做虚拟目录在IIS 6,然后它不工作。 它给错误404 - 找不到文件......

If i am running through VS 2008 then its working fine. if i made virtual directory on IIS 6 then its not working. its giving error 404 - file not found...

感谢

推荐答案

默认情况下,只有那些与ASP.NET(的.aspx,.ashx的等)相关的扩展名的文件被发送到ASP.NET。您需要启用通配符映射,以确保网址的文件夹进行处理(因此,路由)由ASP.NET:

By default, only files with extensions that are associated with ASP.NET (.aspx, .ashx etc) are sent to ASP.NET. You need to enable wildcard mapping to make sure that URLs to folders are processed (and thereby, routed) by ASP.NET:

<一个href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true" rel="nofollow">http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true

这篇关于URL路由不工作在IIS 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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