This post will show you how to modify the default MVC 5 template, so that it uses Autofac to inject the ASP.NET Identity dependencies into the Account Controller. … [Read more...]
How to Create an ASP.NET MVC 5 Web Application
This post will show you how to create a new ASP.NET MVC 5 application using Visual Studio 2013. … [Read more...]
Improving the Authorize Attribute in ASP.NET MVC
The odd thing I've found with the AuthorizeAttribute, is how it redirects you to the sign in page, even when authenticated with a role that doesn't have access to the controller or action. As you can imagine, Joe Blogs (the basic user) might feel a tad confused, when presented with a sign in page when he's already signed in. … [Read more...]
How to Display a Message After Calling RedirectToAction in ASP.NET MVC
Have you ever wondered how to display a temporary message after redirecting to a new page in ASP.NET MVC? In this post, I will show you a simple way of displaying a success message after calling RedirectToAction. … [Read more...]
What is the Post Redirect Get Pattern?
The Post Redirect Get (PRG) pattern is used in web applications to prevent duplicate form submissions. If you are not using the PRG pattern, you might find your web application producing multiple business transactions. This is definitely something you don't want happening in e-commerce or banking applications. … [Read more...]