ASP.NET MVC Url Route supporting (dot)

后端 未结 5 1679
野性不改
野性不改 2020-11-27 03:34

I hope that you can help me with the below problem.

I am using ASP.NET MVC 3 on IIS7 and would like my application to support username\'s with dots.

Example:

5条回答
  •  失恋的感觉
    2020-11-27 04:31

    I don't think the dot is the problem here. AFAIK the only char that should not be in the user name is a /

    Without seeing the route that matches john.lee/details it's hard to say what's wrong, but I'm guessing that you have another route that matches the url, preventing the user details route from being matched correctly.

    I recommend using a tool like Glimpse to figure out what route is being matched.

提交回复
热议问题