2013-09-25 59 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) –

回答

相關問題