2017-01-27 8 views
0

404を取得するにはどうしたらいいですか?ルート上で404のデバッグにアプローチする方法は?

私は私のコントローラに要求を発行しています:

/// <category>Public Note operations</category> 
/// <summary> Gets the public note for the specified entity. </summary> 
/// <returns> Note matching unique NoteId identifier. </returns> 
/// <example> 
///  Sample URI handled by this method is: 
///  <code> 
///  http://localhost:5001/ooo360/api/v2/Note(4a872b89-f42e-e511-9419-00155d104c97)/attachment 
///  </code> 
/// </example> 
[Route("{entityLogicalName}/({entityGuid:guid})/PublicNotes", Name = "GetPublicNotesForEntity")]   
[HttpGet] 
public IEnumerable<Annotation> GetPublicNotesForEntity(string entityLogicalName, Guid entityGuid) 
{ 
    // there's a breakpoint here that never even gets triggered 
    return this._PublicNoteService.Get(entityLogicalName, entityGuid); 
} 

要求の例は次のようになります。

http://localhost:5001/ooo360/api/v2/TroubleTicket(058A9570-D373-E511-9420-00155D10416C)/PublicNotes

私が間違って何をしているのですか?

enter image description here

+0

〜Web API設定の属性ルーティングを有効にしましたか? 〜TroubleTicketとGuidの間に '/ 'を置かないでください - http:// localhost:5001/ooo360/api/v2/TroubleTicket /(058A9570-D373-E511-9420-00155D10416C)/ PublicNotes〜Do 'ooo360/api/v2'が解決されるように適切なルートプレフィックスが設定されていますか? – Developer

+0

愚かな間違いをキャッチしてくれてありがとう、スラッシュがありません –

+0

嬉しいです:) – Developer

答えて

関連する問題