3
我正在構建一個使用ServiceStack的相當簡單的服務,但我在幾個服務上收到了這個非描述錯誤(在瀏覽器中,當試圖查看uri時)。 errorCode:RequestBindingException。消息:無法綁定請求。ServiceStack RequestBindingException
這裏是我有DTO的:
[Route("/jtip/cases/{Count}, GET")]
public class AgencyCaseSummary : IReturn<AgencyCaseSummaryResponse>
{
public int Count { get; set; }
}
public class CaseSummary
{
public int Id { get; set; }
public string AgencyCaseNumber { get; set; }
public string AgencyRepName { get; set; }
public string Service { get; set; }
public string Milestone { get; set; }
public string Status { get; set; }
}
public class AgencyCaseSummaryResponse
{
public List<CaseSummary> CaseSummary { get; set; }
public int ActiveCaseCount { get; set; }
public int OpenRequestCount { get; set; }
}
這是我的服務:
public class AgencyCaseSummaryService : ServiceStack.ServiceInterface.Service
{
// Injection handled by Funq
public IRequestService RequestService { get; set; }
public ILog Log { get; set; }
/// <summary>
/// Gets the case summary for the most recent cases
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public AgencyCaseSummaryResponse Get(AgencyCaseSummary request)
{
AgencyCaseSummaryResponse summary = new AgencyCaseSummaryResponse();
Log.Info("Created new agency case summary call");
try
{
if (request.Count > 0)
{
var caseSummary = RequestService.GetRecentCases(request.Count);
summary.ActiveCaseCount = caseSummary.ActiveCaseCount;
summary.OpenRequestCount = caseSummary.OpenRequestCount;
if (caseSummary.Cases.Count > 0)
summary.CaseSummary = DTOMapper.Map(caseSummary.Cases);
}
}
catch (Exception ex)
{
Log.Error("Api.AgencyCaseService", ex);
}
return summary;
}
}
我錯過了什麼嗎?錯誤是什麼意思?
你用什麼瀏覽器? ng,並且它在多個瀏覽器中有相同的錯誤嗎? – danielunderwood
我正在使用Chrome並嘗試使用IE10。另外,我正在使用一個具有瀏覽器並顯示原始輸出的REST客戶端GUI工具。錯誤在所有3.錯誤是相同的。 –