AngularJS and AntiForgeryToken in ASP.NET MVC

In ASP.NET MVC, AntiForgeryToken is to prevent Cross-Site Request Forgery (CSRF) Attacks. It generates a hidden form field (anti-forgery token) that is validated when the form is submitted. To help prevent CSRF attacks, ASP.NET MVC uses anti-forgery tokens, also called request verification tokens. The client requests an HTML page that contains a form. The server … Continue reading AngularJS and AntiForgeryToken in ASP.NET MVC

CRUD Operations using Knockout and ASP.NET Web API

In this article, We will implement CRUD (Create, Read, update and delete) operations with Knockout.js, ASP.NET Web API, Entity Framework 5.0 Database First Approach. For Add or Edit operation, A modal dialog having WYSIWYG Html editor is used. User can enter information and submit it. It should look like the image below: Creating Project: Open … Continue reading CRUD Operations using Knockout and ASP.NET Web API

What’s really new in ASP.NET MVC 4 (not much)

Attributes [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple=false, Inherited=true)] public sealed class AllowAnonymousAttribute : Attribute This new attribute allows you to secure an entire controller using AuthorizeAttribute but still expose individual actions for anonymous access. [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)] public sealed class HttpHeadAttribute : ActionMethodSelectorAttribute [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)] public sealed class HttpOptionsAttribute : ActionMethodSelectorAttribute [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)] public sealed class … Continue reading What’s really new in ASP.NET MVC 4 (not much)