2013-09-25 62 views
0

我无法访问:MVC路由错误还是我失去了一些东西

http://localhost:54158/Bull/Details/S.No%20GERRY 
http://localhost:54158/Bull/Edit/S.No%20Gurukul 
http://localhost:54158/Bull/Edit/S.No%20GR%2013 

虽然我可以访问:

http://localhost:54158/Bull/Details/GR%20001 
http://localhost:54158/Bull/Edit/TP%20001 

总之,我不能访问URL(周期。 )作为参数。

public ActionResult Details(String id) 
{ 
    Bull bull = db.Bulls.Find(id); 
    if (bull == null) 
    { 
     return HttpNotFound(); 
    } 
    return View(bull); 
} 

我试着在我的代码中放置断点,但对于不可访问的URL,应该触发的操作不是。

+0

你能告诉我们你定义的路由? – statue

+1

[URL中的点导致404与ASP.NET mvc和IIS]的可能重复(http://stackoverflow.com/questions/11728846/dots-in-url-causes-404-with-asp-net-mvc-and -iis) –

回答

相关问题