MVC中
(1):http://localhost/File/105/a&b.xls
这个的地址进入不了File/S3
(2):http://localhost/File/105/ab.xls可以
分析的原因:(1)中包含了&,有没有什么办法,在(1)地址不变的情况进入File/S3?
1,把&使用%26,此方法测试不行,也会报错。
求大神指点。
我在WebConfig中配置了
<modules runAllManagedModulesForAllRequests="true" />
我的路由为
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("Content/{*relpath}");
routes.IgnoreRoute("Images/{*relpath}");
routes.IgnoreRoute("Js/{*relpath}");
routes.IgnoreRoute("Scripts/{*relpath}");
routes.IgnoreRoute("ashx/{*relpath}");
routes.IgnoreRoute("fonts/{*relpath}");
routes.RouteExistingFiles = true;
routes.MapRoute(
"s3file1",
"File/{intFilePathMapID}/{strFileName}",
new { controller = "file", action = "S3", bIsAuditFolderPage = 0 },
new { intFilePathMapID = "\\d+" }
);
其他路由省略