B.1. Configuring SQL Server 2005

Before you can configure your database, you need to be aware of the different security concepts that are inevitably associated with databases and web applications. In Chapter 18 you learned how the different computer accounts used by the web server play a big role when configuring security settings for the file system, and that's not different when connecting to SQL Server. In the following section, you get a quick primer on the different ways to connect to SQL Server. In the section that follows you see how to attach your .mdf database files to SQL Server followed by a discussion of configuring your application and database so they can talk to each other.

B.1.1. Terminology and Concepts

When you connect to a SQL Server database, SQL Server needs to know who you are, so it can enforce the correct access policies on the objects like tables in the database. SQL Server 2005 supports two different authentication mechanisms: SQL Server Authentication and Windows Authentication (often called Integrated Security). Both come with a few advantages of their own and require you to write different connection strings to connect to SQL Server. In the following section you see the two most common connection strings, but you're advised to visit www.connectionstrings.com for an extensive list of possible connection strings.

B.1.1.1. SQL Server Authentication

With SQL Server Authentication, SQL Server takes care of user management. You manage the users for your ...

Get Beginning ASP.NET 3.5: In C# and VB now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.