How Do I: Use HttpVerbs Attributes in an MVC Application?

Posted in Frameworks, Companies, Development on November 26, 2011


Get Microsoft Silverlight

In this video Chris Pels shows how to use the HttpVerbs attributes to control access to MVC actions. First, a sample application is created with a default controller and view for editing the information. Next, a second Index action is added to the controller which has an HttpPost attribute which restricts it to being called only when an HTTP POST is used. As a follow-up, the AcceptVerbs() attribute is implemented as an alternative syntax for Visual Studio 2008. A use of the HttpVerbs for preventing the security risk associated with using an HTTP GET to perform a delete from a link is then discussed.

Presented by Chris Pels

Date: 30 December 2009

Watch Video Watch Video Watch Video on External Site

Tags: Frameworks, Microsoft, ASP.NET, .NET Framework, Broadcasting, Screencasts, Development, Companies