Tag Archives: ASP.NET

Logging SQL Queries in MVC With Entity Framework 6

Entity Framework Logo

As developers we’re inclined to want to understand what is happening under the hood or at least know that we can check if we wanted to. This is the case with Entity Framework, which performs some magic to provide access to a database and allowing us to perform actions against it. While 99% of the… Continue Reading

Two Factor Authentication in ASP.NET MVC

Two Factor Authentication devices

It’s becoming more and more common for websites to provide the capability of having two factor authentication as part of you login process. Google, GitHub, Hotmail and Dropbox just to name a few of the organisations that have embraced two factor authentication and provided it as an optional security measure. In this article I will… Continue Reading

Using reCAPTCHA in your ASP.NET MVC app

The Internet is full of bots. There’s no denying it, bots have been created to perform tasks on the Internet for many purposes, a good example is Ticketmaster, who have calculated that approximately 60% of all bookings are made by bots (src nyt). One of the most common practices for fighting back against bots is… Continue Reading

ASP.NET MVC4 AuthorizeAttribute throughout app

Control access to your webpages with the AuthorizeAttribute

If you’re developing a website where there should only be a couple of publicly accessible pages in ASP.NET MVC, then at first you may try to go through all your controllers decorating them with the AuthorizeAttribute. Although you will still want to allow anonymous users access to the login page otherwise anonymous users can never… Continue Reading

Track number of times a file is downloaded

Being able to track how many times a file has been downloaded from your website is a useful bit of information. One method of doing this is by making it so that the user is instead of being sent directly to the file is sent to a web page which then sends the user the… Continue Reading