用DW做的网站生成链接,产品设计个人作品集,个人工作室装修风格,广东网站建设找看了重典的两篇文章 System.Web.Routing入门及进阶 上篇 System.Web.Routing入门及进阶 下篇 仿照其中的进行了操作#xff0c;发现怎么不都起作用#xff0c;非常奇怪#xff0c;搜了好多才找到了解决方案 是在MSDN上找到的#xff0c;如下#xff1a; To configure …看了重典的两篇文章 System.Web.Routing入门及进阶 上篇 System.Web.Routing入门及进阶 下篇 仿照其中的进行了操作发现怎么不都起作用非常奇怪搜了好多才找到了解决方案 是在MSDN上找到的如下 To configure an ASP.NET Web site project for routing In the applications Web.config file, add the ASP.NET routing assembly to the assemblies element, as shown in the following example: Copy Code add assemblySystem.Web.Routing, Version3.5.0.0,Cultureneutral,PublicKeyToken31BF3856AD364E35/ If the application runs under IIS 6.0 or IIS 7.0 Classic mode, add the UrlRoutingModule class to the httpModules element, as shown in the following example: Copy Code httpModulesadd nameUrlRoutingModuletypeSystem.Web.Routing.UrlRoutingModule,System.Web.Routing,Version3.5.0.0,Cultureneutral,PublicKeyToken31BF3856AD364E35//httpModules If the application runs under IIS 7.0 Integrated mode, add the UrlRoutingModule class to the modules element, as shown in the following example: Copy Code system.webServermodulesremove nameUrlRoutingModule /add nameUrlRoutingModuletypeSystem.Web.Routing.UrlRoutingModule,System.Web.Routing,Version3.5.0.0,Cultureneutral,PublicKeyToken31BF3856AD364E35//modules/system.webServer If the application runs under IIS 7.0 Integrated mode, add the UrlRoutingHandler class to the handlers element as shown in the following example: Copy Code system.webServerhandlersadd nameUrlRoutingHandlerpreConditionintegratedModeverb*pathUrlRouting.axdtypeSystem.Web.HttpForbiddenHandler,System.Web, Version2.0.0.0,Cultureneutral,PublicKeyTokenb03f5f7f11d50a3a //handlers/system.webServer 需要在web.config中进行以上配置 一般的教程中只提到了1和2 1是必须的而2是针对IIS的经典模式的 而我用的是IIS7的集成模式 所以需要进行3和4的配置按照3和4进行了操作以后 就成功了 转载于:https://www.cnblogs.com/zhangrou/archive/2009/01/18/1377985.html