ASP.NET MVC: HttpOptions action filter
HttpOptions action filter specifies that, user should access this action method via HTTP OPTIONS request. Trying to access other than HTTP OPTIONS verb will fail and result in HTTP 404 not found error. This action filter is new in MVC 4. With HTTP OPTIONS verb client can determine the capabilities of the server.
Attribute Usage: Only method
Sample Code:
[HttpOptions]
public ActionResult About()
{
return View();
}
Alike other action filter, We can’t access such method with other than HTTP OPTIONS verb.
Check out ASP.NET MVC: Action filter series post to read about other available action filters.
You can follow me on twitter for latest link and update on ASP.NET & MVC.