Microsoft Visual Basic .NET 2003 Resource Kit Database Configuration Details
Step 1: Install MSDE
In order for the database access samples to function properly, a named instance of Microsoft SQL Server 2000 Desktop Engine (MSDE) is required. To download and install the Microsoft SQL Server 2000 Desktop Engine, please follow the instructions on the Microsoft .NET Framework SDK MSDE help page.
Without MSDE installed, some code samples and starter kits may not be available.
Step 2: Add the SQL Server Database to SQL Server
Two databases are used throughout the resource kit: The two SQL demo databases: Pubs and NorthWind.
To install the two demo databases, please run the ConfigureNetSDK batch file.
Step 3: Grant Access to the ASPNET user
The ASP.NET process runs under a specific account. In order for the data access samples to access the database, this account must be granted rights to the sample databases. If the operating system is part of the Windows Server 2003 family the ASP.NET process runs under NT AUTHORITY\NETWORK SERVICE account. In all other cases it runs under MACHINENAME\ASPNET account.
For Windows Server 2003 family systems running IIS 6.0, please run the ConfigureNSUser batch file.
For all other cases, please run the ConfigureASPUser batch file.
Troubleshooting
Starting MSDE
The Resource Kit samples that demonstrate database access require that MSDE is started. If MSDE is stopped, most samples will throw a, "Timeout expired" or "SQL Sever does not exist or access denied" error. To start MSDE:
From the command line, type:
net start MSSQL$NetSDK
Pre-Existing Data Files
If database files with the same filename already exist on the hard drive, the samples configuration utility will not overwrite/replace these files. You could get the following error message.
揝etup failed to configure the server. Refer to the server error logs and setup error logs for more information:?
There are two ways to correct this problem:
1. Delete or rename the following files from the C:\Program Files\Microsoft SQL Server\MSSQL$NetSDK\Data directory.
Pubs.mdf
Pubs_log.ldf
northwind.mdf
northwind.ldf
2. Complete the instructions outlined in the Add the SQL Server Databases to SQL Server and Grant Access to the ASPNET user sections above.