URL 路由中发现 404 错误
我已经在我的项目中实现了 UR 路由,它在我的本地计算机上运行良好, 但在服务器上出现 404 错误,在 IIS 中,应用程序池是 Asp.net 2.0
我在 Web.config 中添加了以下行:
<add name="RoutingModule" type="System.Web.Routing.UrlRoutingModule,
System.Web.Routing, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
I have implemented The UR routing in my projects,it works fine on my local machine,
But gives 404 error on the server, In IIS there is Application Pool is Asp.net 2.0
I have added the below line in my Web.config:
<add name="RoutingModule" type="System.Web.Routing.UrlRoutingModule,
System.Web.Routing, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您没有发布一些代码,但我猜您指的是开发计算机上的虚拟路径,并且在服务器中它是常规应用程序(在 IIS 中),因此它使您的路径加倍:
D:\webhome\ Transtutors-May \Transtutors-May\ 问题\财务
You didn't publish some code, but I guess you refer to virtual path on your dev machine, and in the server it's a regular application (in IIS) so it doubles your path:
D:\webhome\ Transtutors-May\Transtutors-May\ Questions\finance
处理这种情况的一种可能的方法:
绞尽脑汁在 IIS 7 托管环境中获取 URL 路由:ASP.NET
A possible way of handling this situation:
Breaking my head to get Url Routing in IIS 7 hosting environment : ASP.NET