ASP.NET MVC 2 Issue - Dot in Route gives an example to allow dot (.) in url and allow .svc file.
My question is, how to allow any kind of file, I tried:
<httpRuntime relaxedUrlToFileSystemMapping="true" />
<remove extension=".*"/>
Not working! What I want is: for any kind of URL (any chars) can processed by MVC3 Route(MapRoute).
here is the solution:
First: it will NOT cause security leak, if you visit
/web.config
, you will getUnless you change the
hiddenSegment
of course.here is the solution, at
web.config
file:Static-Favicon and Static-Robot can be removed, if you like your MVC handle these two files as well.
Btw, you still need the
<remove extension=".svc" />
to handle svc file, andrelaxedUrlToFileSystemMapping
for special codes in url