日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

关于使用在webforms里使用routing遇到的问题

發(fā)布時(shí)間:2023/12/1 编程问答 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 关于使用在webforms里使用routing遇到的问题 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

看了重典的兩篇文章

System.Web.Routing入門(mén)及進(jìn)階 上篇

System.Web.Routing入門(mén)及進(jìn)階 下篇

仿照其中的進(jìn)行了操作,發(fā)現(xiàn)怎么不都起作用,非常奇怪,搜了好多才找到了解決方案

是在MSDN上找到的,如下:

To configure an ASP.NET Web site project for routing

?

  • In the application's Web.config file, add the ASP.NET routing assembly to the assemblies element, as shown in the following example:

    Copy Code <add assembly="System.Web.Routing, Version=3.5.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35"/>
  • 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 <httpModules><add name="UrlRoutingModule"type="System.Web.Routing.UrlRoutingModule,System.Web.Routing,Version=3.5.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35"/></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.webServer><modules><remove name="UrlRoutingModule" /><add name="UrlRoutingModule"type="System.Web.Routing.UrlRoutingModule,System.Web.Routing,Version=3.5.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35"/></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.webServer><handlers><add name="UrlRoutingHandler"preCondition="integratedMode"verb="*"path="UrlRouting.axd"type="System.Web.HttpForbiddenHandler,System.Web, Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" /></handlers></system.webServer>
  • 需要在web.config中進(jìn)行以上配置

    一般的教程中只提到了1和2

    1是必須的,而2是針對(duì)IIS的經(jīng)典模式的

    而我用的是IIS7的集成模式

    所以需要進(jìn)行3和4的配置,按照3和4進(jìn)行了操作以后

    就成功了!

    轉(zhuǎn)載于:https://www.cnblogs.com/zhangrou/archive/2009/01/18/1377985.html

    總結(jié)

    以上是生活随笔為你收集整理的关于使用在webforms里使用routing遇到的问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

    如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。