A sitemap is good for SEO because it tells search engines what pages of your site it should index. But how do we create a sitemap in ASP.NET Core? In this post I will show you a very simple way to generate a sitemap that works in ASP.NET MVC and ASP.NET Core web projects. … [Read more...]
Configuring Autofac to work with the ASP.NET Identity Framework in MVC 5
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...]
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...]