开发者

asp.net mvc url routing to /Folder/Folder/Setup.exe?

开发者 https://www.devze.com 2023-02-19 12:11 出处:网络
can I use ASP.NET MVC URL like this witout redirect to it from Global.asax?: http://test.com/product/versions/0.9开发者_高级运维/Setup.exe

can I use ASP.NET MVC URL like this witout redirect to it from Global.asax?:

http://test.com/product/versions/0.9开发者_高级运维/Setup.exe

is this case products is Controller and /versions/0.9/Setup.exe just a /folder/folder/Setup.exe

how it should be in my controller? without action.. or?


You can ignore routes for a specific extension: Make routing ignore requests for a file extension

Something like this:

routes.IgnoreRoute("{*setupfiles}", new {setupfiles=@"(.*/)?.exe(/.*)?"});
0

精彩评论

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