Configuring ASP.NET 2.0 apps to SQL Server 2005 databases
Improved security features in ASP.NET 2.0 and SQL Server 2005 makes configuring the two a little tricky. Here we point to two tutorials that explain the process quite well.
Without data access, ASP.NET applications are just pretty Web pages. Trouble is, connecting ASP.NET apps to a SQL Server database isn't exactly a walk in the park, particularly when working with the beefed-up security features in ASP.NET 2.0 and SQL Server 2005.



Download: The Developer's Guide to IoT
The IoT world may be exciting, but there are serious technical challenges that need to be addressed, especially by developers. In this handbook, learn how to meet the security, analytics, and testing requirements for IoT applications.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
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.
Start the conversation
0 comments