I just received a report from a user where he only uses attribute routing and because of the HTTP method route constraint that we create from the attribute, no other HTTP methods can reach the Web API pipeline. That’s problematic for the preflight requests which sends an OPTIONS.
[RoutePrefix("api/profiles")]
public class ProfilesController : ApiController
{
[System.Web.Http.HttpGet("{personId}/app/{appId}", RouteName = "ProfileApiGetPersonApp")]
public async Task<HttpResponseMessage> GetPersonApplicationProfile(Guid personId, Guid appId)
See the full context here: http://aspnetwebstack.codeplex.com/discussions/438303
[RoutePrefix("api/profiles")]
public class ProfilesController : ApiController
{
[System.Web.Http.HttpGet("{personId}/app/{appId}", RouteName = "ProfileApiGetPersonApp")]
public async Task<HttpResponseMessage> GetPersonApplicationProfile(Guid personId, Guid appId)
See the full context here: http://aspnetwebstack.codeplex.com/discussions/438303