开发者

relaxedUrlToFileSystemMapping="true" doesn't work

开发者 https://www.devze.com 2023-02-16 22:42 出处:网络
I have a route in my mvc (.net 4) application, which is supposed to appear like it\'s retrieving a mp3开发者_StackOverflow中文版 file from the server. To obtain that, I\'m doing like this:

I have a route in my mvc (.net 4) application, which is supposed to appear like it's retrieving a mp3开发者_StackOverflow中文版 file from the server. To obtain that, I'm doing like this:

 routes.MapRoute(
                "DownloadPodcast", 
                "download/{action}/{episodeId}/{foo}", 
                new { controller = "Files", action = "DownloadPodcast", episodeId = UrlParameter.Optional }
            );

This works fine on localhost, but when I publish it to my IIS6 server, I get an 404 error. I've googled it a lot, and everybody says that I should add this to my web.config:

<httpRuntime relaxedUrlToFileSystemMapping="true" />

BUT - it doesn't seem to have any effect :(

0

精彩评论

暂无评论...
验证码 换一张
取 消