0
嗨我正在使用wep api 2創建此路線。我已經在wep api上尋找動作2
我WebConfigApi定義
config.MapHttpAttributeRoutes();
// In Globa.asax
GlobalConfiguration.Configure(WebApiConfig.Register);
爲
[Route("api/pO")]
[AcceptVerbs("Getpo")]
[HttpGet]
public IEnumerable<pOver> Getpo()
{
------
}
當我運行這個使用
../api/pO/Getpo
我不斷收到錯誤
"<Error><Message>No HTTP resource was found that matches the request URI 'http://localhost:60482/api/pO/Getp0'.</Message><MessageDetail>No action was found on the controller 'prO' that matches the request.</MessageDetail></Error>"
我的方法裝飾
請讓我知道如何正確裝飾它來運行它。 感謝