Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Weird 405 Error

$
0
0

I have the following method signature in my WebAPI controller:

[System.Web.Http.Route("api/paging/reports/{ProjectID?}/{PageNumber?}")]
public ReportPageData ReportPage(Guid? ProjectID, int? PageNumber)

When I try to access it through IE, curl, wget, or any other program that can make GET requests, it returns a 405 error immediately (without running the code in the method). The following method in the same controller works fine:

[System.Web.Http.Route("api/getreports/{Project?}")]
public IEnumerable<dynamic> GetAllReports(Guid? Project)

What would make this happen?


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>