This page provides a detailed listing of the configuration steps performed by the .NET Framework QuickStart configuration program. It also contains solutions to common problems related to the samples setup.
General SQL Server/SQL Server Express Information
In order for the database access samples to function properly, a named instance of Microsoft® SQL Server Express™ is required. To download and install Microsoft SQL Server Express, please follow the instructions on the Microsoft SQL Server Express download page at http://go.microsoft.com/fwlink/?LinkId=31766.
Installing SQL Server 2005 instead of SQL Server Express
The user can also use ConfigSamples.exe to install a named instance or a default instance of SQL Server 2005 by passing in the switch /sql_instance:<named_instance>.
<sdk Install Path>\samples\setup\configsamples.exe /sql_instance:<MyInstanceName>
The SQL Server Express instance name used by the SDK samples is 'SQLExpress'. To access the database, use the server name: (local)\SQLExpress.
<SDK Prompt> sqlcmd -S (local)\SQLExpress -E -d <database>
Installing the SDK Quickstart Tutorials Manually
The SDK Quickstart tutorials require Internet Information Server. For help installing Internet Information Server see the Windows Help documentation.
. . .
<sourceview>
<add key="root" value="C:\Program Files\Microsoft.NET\SDK\v2.0\QuickStart" />
</sourceview>
. . .
If you are going to host the QuickStart to enable users from other machines to view and run the QuickStart, set the RemoteHosted appSetting key value to true in the web.config file. This will prevent your computer from hosting some samples that were not designed for use by un-trusted sources.
<appSettings>
<add key="RemoteHost" value="true" />
</appSettings>
Note: If you are installing the QuickStart on a Windows Server 2003, 64-bit Windows XP, or newer Windows operating systems, ASP.NET Web Server Extensions must be 'Allowed' for the QuickStart to work. See the 'Enabling and Disabling Dynamic Content' section of the IIS help documentation for more information.
Resolving the ".NET Framework SDK installation (not found)" Error in ConfigSamples.Exe
The samples configuration utility will return a ".NET Framework SDK installation (not found)" error if it does not detect an installation of the corresponding version of the .NET Framework SDK. If you receive this error, please confirm that the registry key created by the .NET Framework SDK (HKLM\SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv2.0) exists. If this registry key does not exist, it indicates that the .NET Framework SDK was not installed or that the installation did not complete successfully. In this case, please reinstall the .NET Framework SDK.
The ASP.NET Quickstart Localization samples require several fonts (e.g. Japanese) to view the samples correctly. The installation procedure for these fonts may require the original Windows CD. To install new fonts, complete the following steps:
On Windows 2000
On Windows XP or Windows 2003
1. ERROR: SQL Server Express Installation Failed
This is a general SSE installation error message. Please go to Start -> Settings -> Control Panel -> Administrative Tools -> Services and look for the service named "SQL Server (SQLEXPRESS)". If it is there, please start it. If it is not there, please run ConfigSamples.exe again.
For more information, please go to http://lab.msdn.microsoft.com/vs2005/get/vsbeta2installissues/default.aspx#sse.
2. ERROR: SQL Server Express Download Failed
Please try and manually download the SSE installation package. To download the 32-bit-only SSE (32MB), please go to http://go.microsoft.com/fwlink/?LinkId=47324. To download the 32/64 bit SSE (70MB), please go to http://go.microsoft.com/fwlink/?LinkId=39581. Please then re-run the ConfigSamples.exe, and when you reach the page that sets the options for the SQL Server Express, select the second option "Download from the local machine" and browse to the downloaded location.
ConfigSamples Command Line Parameters
The SDK Quickstart Setup utility provides the following command line parameters to make setup and uninstall of the QuickStart easier.
Usage: ConfigSamples [-?] [-q] [-v] [-sql_instance:name]
| Parameter | Details |
| -? | Show parameter usage information |
| -q | Run in quiet mode. No UI is displayed. Default values will be selected if not specified by a switch. By default SQL Express is downloaded and installed by ConfigSamples. |
| -v | Show verbose information. Verbose log information will be displayed to the console instead of the standard log file is this switch is specified. |
| -i | Ignore install failures. Do not rollback changes. The -i switch can be to force ConfigSamples to install the QuickStart even when there are installation problems. |
| -uninstall | This option will cause ConfigSamples to remove the Quickstart Virtual directories and compiled binaries from you computer. It will not remove SQL Server Express or uninstall the sample databases. |
| -enable_aspnet | This option will enable ASP.NET in IIS if it was not previously installed and enabled. |
| -skip_sqlexpress | Skips the download and installation of SQL Server Express |
| -sql_instance:<name> | This option allows you to specify your own SQL Server instance name. If you do not specify an instance name as the parameter ConfigSamples will attempt to install to the default SQL Server instance. By default ConfigSamples will try to install the SQLServerExpress named SQL instance. |
ConfigSSE Command Line Parameters
ConfigSSE was designed to allow you to install SQL Server Express and the SDK Sample databases without setting up the rest of the QuickStart.
Usage: ConfigSSE [-?] [-q] [-v] [-sql_instance:name]
| Parameter | Details |
| -? | Displays usage information |
| -q | Runs in silent mode. No UI is displayed and defaults are selected. By default SQL Server Express is downloaded and installed. |
| -v | Verbose mode. Logging information is displayed in the command prompt. |
| -i | Ignores all setup errors. |
| -sql_instance:<name> | This option allows you to specify your own SQL Server instance name. If you do not specify an instance name as the parameter ConfigSamples will attempt to install to the default SQL Server instance. By default ConfigSamples will try to install the SQLServerExpress named SQL instance. |
Scrubbing 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. There are two ways to correct this problem:1. Delete or rename the following files from the C:\Program Files\Microsoft SQL Server\MSSQL$SQLExpress\Data directory.
- Pubs.mdf
- Pubs_log.ldf
- northwind.mdf
- northwind.ldf
- GrocerToGo.mdf
- GrocerToGo.ldf
- ASPNETDB.mdf
- ASPNETDB_log.ldf
2a. Complete the instructions outlined in the Adding the SQL Server Databases to SQL Server Express and Granting Access to the ASPNET user sections above.
2b. Or, run the samples configuration utility (ConfigSamples.exe) again.
Setting the NetSamplePath Environment Variable
The NetSamplePath environment variable is required to compile the QuickStart samples. Set the NetSamplePath environment variable to <SDK> directory. The <SDK> directory name must be in the short form (no spaces). For an example of what NetSamplePath should be set to, see the SDKVars.bat file located in the <SDK>\Bin directory.
The process of setting an environment variable varies depending on your operating system. In general, the command is:
Grant a New User Account Access to a Database
Please replace DATABASE NAME with the name of the database and replace USER NAME with the name of the user account.
How to run the Quickstarts as Normal User
If you need to connect to the SSE using a normal user account as oppose to an administrator account, for all instances where you would otherwise use
sqlcmd -E .....
please use
sqlcmd -U <Username> -P <Password> .....
instead. Also, since you will no longer be using Integrated security for your web site, then the connection strings located in the web.config files need to be changed to the following format:
<add name="DatabaseName" connectionString="Server=ServerName; Database=DatabaseName;User ID=UserName;Password=Password;" providerName="System.Data.SqlClient" />
from the previous format:
<add name="DatabaseName" connectionString="Server=ServerName;Integrated Security=True;Database=DatabaseName;Persist Security Info=True" providerName="System.Data.SqlClient" />
How to Give Network Service the Write Access
If your current identity (NT AUTHORITY \ NETWORK SERVICE) does not have write access, including the temporary directory, please run the following command to grant the appropriate permissions:
<SDK Prompt>aspnet_regiis -ga "NT Authority\Network Service"