The topic of configuring ASP.NET 2.0 applications to work with SQL Server 2005 first came up, naturally, in the weeks before both products were released to the world. Since different enterprises migrate to new technologies at different speeds, though, we thought it wise to revisit this topic by pointing to a couple very thorough tutorials.
The first tutorial, Configuring an ASP.NET 2.0 Application to Work with Microsoft SQL Server 2000 or SQL Server 2005 by Imar Spaanjaars, begins with a quick look at the two types of authentication that can be used to access a SQL Server database. From there, the author offers quick hints for attaching the appropriate databases to SQL Server.
The bulk of Spaanjaars's piece, though, centers on the three main scenarios for configuring the database and application:
- SQL Server authentication -- " From a configuration point of view, this is probably the easiest scenario to configure: all you need to do is create a user in SQL Server, assign a password and then use that account in the connection string."
- Windows Authentication with IIS and the database on the same machine -- " This scenario makes it easy to use Integrated Security because both the web server and SQL Server can use the same Windows account."
- Using Windows Authentication with IIS and the database on different machines -- " When using this scenario, there are two options that you need to be aware of: both machines fall under the same Windows domain, or both machines can be seen as independent, stand alone machines."
The second tutorial, Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005, comes from Scott Guthrie. ASP.NET 2.0 comes with several application services, which are APIs governing membership, roles, personalization and other "super common scenarios with Web applications today," Guthrie notes.
Out of the box, these application services are configured to use the free SQL Express database, so Guthrie provides a quick walkthrough of the process of connecting the services to a regular old SQL Server database. Fortunately, there is a wizard to lead developers along.
Once the application is configured to its database, development can begin in earnest. Questions will undoubtedly emerge along the way, and in that regard, one should visit the ASP.NET 2.0 Learning Guide or the SQL Server 2005 Learning Guide for assistance.
This was first published in March 2007