ASP.NET MVC Route Identifiers with Period

If I have a route with the following:

{controller}/{action}/{id}

I am looking at the following url:

c1/a1/abc.

This does not work. This only happens if the period is at the end of the URL. Any way to get ASP.NET MVC to recognize this as part of an identifier?

+5
source share
2 answers

After reading the answers to two similar problems below, I can only assume that you are coding for this period before passing it to you in the MVC application. It seems that this period is also considered as a rule separator as "/".

A similar problem here:

+1

.NET 4.0, web.config, :

<system.web>
    ...
    <httpRuntime relaxedUrlToFileSystemMapping="true" />
    ...
</system.web>

, . Haack .

+12

All Articles