에서 슬래시없이이 :ASP.NET 라우팅 -으로 다음과 같은 서비스 계약을 고려 끝에
[WebGet(UriTemplate = "/stores")]
DTO.Stores GetAllStores();
[WebGet(UriTemplate = "/stores/{name}")]
DTO.Stores GetStores(string name);
나는이 두 개의 URL에 도달 할 수 있습니다 : http://localhost/v1/stores 및 http://localhost/v1/stores/Joe을. 그러나 URL http://localhost/v1/stores/ (끝 부분에 슬래시가 있음)은 "엔드 포인트를 찾을 수 없음"오류를 리턴합니다. 이상적으로는 http://localhost/v1/stores/에 GetAllStores()를 호출하고 싶습니다.
어떻게하면됩니까? 감사!