You can find the wrox.com code downloads for this chapter on the Download Code tab at
www.wrox.com/remtitle.cgi?isbn=1118311809. The code is in the chapter 16 download.
Until now, you have been creating pages in your website that are accessible to all visitors to
your site. There is currently no way to block certain resources like ASPX fi les or even whole
folders for specifi c users. That means, for example, that currently anyone can access your
Management folder and start messing with the genres and reviews in the system.
16
c16.indd 603 16.indd 603 10/8/2012 10:10:31 AM 0/8/2012 10:10:31 AM
604 x CHAPTER 16 SECURITY IN YOUR ASP.NET 4.5 WEBSITE
Clearly, this is not something you’d want in a production website. So you need to think of a good
security strategy to stop unwanted users from accessing specifi c content. You also need to look at a
mechanism that enables users to sign up for a new account, and at the same time enables you to designate
certain users as managers of your website and grant them special access rights.
ASP.NET 4.5 and VS ship with all the tools you need to create a solid and safe security mechanism.
In this chapter, you learn how to make use of these tools in your ASP.NET website.
Before you start looking at how security is implemented in the ASP.NET Framework, you need to
understand a few important terms that you’ll come across in every discussion on security.