
AspNetMvc
Get flash to fully experience Pearltrees
User friendly CAPTCHA for Asp.Net MVC
ASP.NET WebAPI: Getting Started with MVC4 and WebAPI
Introduction I’ve spent last year working on ASP.NET MVC3 and felling good this year on MVC4. I got some new exciting features after updating to MVC4, Web API is one of those exciting features. I have read a lot on this feature and got a lot good articles on web. But I didn't get any article that covers all concepts in one place.Conditional Attributes in Razor View Engine and ASP.NET MVC 4
One of the scenarios that I always demonstrate during an ASP.NET MVC class is how to create a mass assignment vulnerability and then execute an over-posting attack. It is a mass assignment vulnerability that led to a severe problem on github last week. Let's say you have the following model. public class User { public string FirstName { get ; set ; } public bool IsAdmin { get ; set ; } } When you want to let a regular user change their first name, you give them the following form.
6 Ways To Avoid Mass Assignment in ASP.NET MVC
I’ve recently been introduced to the Managed Extensibility Framework by a colleague at work, and have enjoyed picking it up so much it made me wonder how I could apply the simplicity of composition into my favourite web framework, ASP.NET MVC. There are a few obstacles to overcome initially, namely how instances are composed by default, and how the MVC system handles custom controllers. The idea behind this project, is to enable a Controller to be developed and deployed in it’s own assembly, with the ability to drop it into a project as an extension. Thus, as is the nature of MEF, this was down to exports and imports. MVC allows us to customise how controllers are created by implementing our own controller factory, so we can use this as well.
Using MEF with MVC Controllers - var Matt = new Hero();
Building on the work I have done previous (see Using MEF with MVC Controllers ), I’ve created a revised architecture of MEF + MVC using .NET 4.0. I’m (mostly) happy with the outcome. One of the things I wanted to get right, was allowing true modularity using MEF. As you already know, its now relatively painless to do modular code with ASP.NET (thanks to standard .NET activation, or using something like MEF for automatic composition), but one of the challenges is not how the code plugs in, but the views themselves. This was always difficult with WebForms because of the way the .aspx pages are compiled (seperately from the code). The other pain is the way you may have had to organise your files in the file system, they were also disconnected from the libraries because these had to exist in the \bin directory of your application.

