![](/img/trans.png)
[英]Getting the error: “No HTTP resource was found that matches the request URI” in WebAPI and AngularJS
[英]No HTTP resource was found that matches the request URI in webapi
每當我運行Web API服務時,都會得到以下響應
No HTTP resource was found that matches the request URI 'http:/xxxxxxxxxxx/api/values/Signup_v3?RefferalCode="4566"&Emailid=pavan@fffffmmm&Password=44444444&DeviceID=sdsdsd&PlatformID=3&DeviceToken=dsfnjdsdfkj&Mobilemodel=nojik&Appversion=2.2&MobileOS=hjkdd'.
我的服務是:
[AcceptVerbs("GET","POST")]
public HttpResponseMessage Signup_v3(string RefferalCode, string EmailID, string Password, string Mobile, string UserName, string DeviceID, int PlatformID, string DeviceToken, string Mobilemodel, string Appversion, string MobileOS)
{
}
我的webapiconfig文件是:
public static void Register(HttpConfiguration config)
{
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
請幫我。
您應該發布/獲取完整的參數:
api/Values/Signup_v3?RefferalCode={RefferalCode}&EmailID={EmailID}&Password={Password}&Mobile={Mobile}&UserName={UserName}&DeviceID={DeviceID}&PlatformID={PlatformID}&DeviceToken={DeviceToken}&Mobilemodel={Mobilemodel}&Appversion={Appversion}&MobileOS={MobileOS}
例如這樣:
http://localhost:6642/api/Values/Signup_v3?RefferalCode=12&EmailID=12&Password=12&Mobile=12&UserName=12&DeviceID=1&PlatformID=1&DeviceToken=15&Mobilemodel=345&Appversion=4&MobileOS=4
或使用默認值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.