开发者

asp.net mvc 3 url end with a "." and throws a 404

开发者 https://www.devze.com 2023-03-14 11:03 出处:网络
I have a asp.net mvc 3 application and I want the users to be able to enter in tags of sorts.However, when a tag ends with a \".\" (no quotes) it throws a 404 开发者_如何学Gobefore hitting the control

I have a asp.net mvc 3 application and I want the users to be able to enter in tags of sorts. However, when a tag ends with a "." (no quotes) it throws a 404 开发者_如何学Gobefore hitting the controller's method.

Any ideas...? Is this common or something jacked up with my configuration?


I think IIS is throwing the 404 before control gets to your application. I suspect it's matching the ExpressionlessURLHandler for the path *..

If you are brave, I suppose you could change the handler for that path to be asp, but I suspect there are some security implications to allowing that path through to asp.

Perhaps use a different character?


This question was already asked and answered. It is a silly MS thing.

Semantic urls with dots in .net

0

精彩评论

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