在Win25008 R2的服务器上面。程序池是单独的且是集成模式。
处理程序映射添加的是托管处理程序,添加脚本映射不管用。在Web.config里面生成
<add name="ALL" path="*" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" preCondition="integratedMode" />
路由设置是:
routes.MapPageRoute("Class",
"{Aclass}/",
"~/C.aspx");
http://www.abc.com/123/这样的网址我是可以访问了,路由生效了。但我直接访问http://www.abc.com/网站域名就会出现错误。
Server Error in '/' Application.
The resource cannot be found.
我在线等,知道的大神们说下,谢谢。
处理程序映射添加的是托管处理程序,添加脚本映射不管用。在Web.config里面生成
<add name="ALL" path="*" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" preCondition="integratedMode" />
路由设置是:
routes.MapPageRoute("Class",
"{Aclass}/",
"~/C.aspx");
http://www.abc.com/123/这样的网址我是可以访问了,路由生效了。但我直接访问http://www.abc.com/网站域名就会出现错误。
Server Error in '/' Application.
The resource cannot be found.
我在线等,知道的大神们说下,谢谢。
解决方案 »
- vs2008调试怎样禁止弹出Microsoft JScript 运行时错误:
- 【真心高分求教】我这个服务器配置、内容,该不该装硬件防火墙?
- 请教一下,asp.net怎么深度复制一个Control
- 如何把这两条SQL语句写成一条语句。
- 请教:安装.net遇到的问题
- 如何把动态网页转换成静态网页
- 在gridview的PagerTemplate中的控件绑定问题
- 菜鸟问题:asp.net 运行环境是什么?vs.net 是不是visual studio.net?
- 第一次使用水晶报表就遇到了这种问题,着急阿!!!!
- OleDbDataAdapter.Fill(DataSet)效率问题
- asp:Repeater 去掉最后一行
- URL相关的技术问题
"Default", // 路由名称
"{controller}.aspx/{action}/{id}", // 带有参数的 URL
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // 参数默认值
);
问题还没有解决。就是网站域名www.abc.com访问不了。www.abc.com/index.aspx都是可以访问的。
{
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath, false); IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath, false);
}</script>看看灵不灵