views:

99

answers:

2

If I have a route with the following

{controller}/{action}/{id}

and I look at the following URL

c1/a1/abc.

it doesn't work. This only happens when the period is at the end of the URL. Any way to get ASP.NET MVC to recognize that as part of the ID?

+1  A: 

Reading through the answers to the two similar problems below, I only can suggest that you encode the period before passing it to you MVC application. It looks as the period is also treated as a delimter to a rule succh as "/".

Similar problem here:

Obalix
A: 

If you are using .NET 4.0, you can set this flag in the system.web section of your web.config and it will be allowed:

<httpRuntime relaxedUrlToFileSystemMapping="true" />

I've tested it and it works. Haack has an explanation of it.

thekaido