Publishing a Web Site Based on an ASP.NET Starter Kit
ASP.NET starter kits can be downloaded from the ASP.NET Web site.
The following instructions use the ASP Time Tracker starter kit as an example. However, you can use this upload procedure for any starter kit that uses a SQL database (running from a local MDF file or a standalone server). The directions assume the following:
- You have downloaded an ASP.NET starter kit and developed a web application locally.
- The database uses a local MDF file (starter kit default setting).
- The Database Publishing Wizard client is installed on your local machine.
- You have at least one Microsoft SQL Server database setup on your hosting account.
To Publish Your Database Web Application to the Hosting Server:
- Create a Connection to your database from Visual Web Developer.
- In Visual Web Developer, open the Database Explorer tab.
- Open a connection to your local SQL Server.
- Right-click Data Connections and select add Connection.
- If the Change Data Source dialog comes up, choose Microsoft SQL Server. Leave the default setting for Data Provider.
- Press OK.
- On the Add Connection Dialog, enter localhost for the Server name.
- Select Attach a database file.
- Click Browse.
- On the file dialog, locate your MDF and press Open.
- Enter a logical file name. This should be easily associated with your project.
- Click OK.
- Right-click the entry for your Web Site Database. Select Publish to Provider. This will launch the Database Publishing Wizard.
- Follow the instructions for Setting up a SQL Server Database on Your Hosting Account.
- Modify the default connection strings section of your web.config file.
- Add the following Time Tracker connection string entry below to your web.config file, making the same substitutions as in the previous step:
<add name="aspnet_staterKits_TimeTracker" connectionString="
Server=whsql-v04.prod.mesa1.secureserver.net;
Database=DB_675;
User ID=user_id;
Password=password;
Trusted_Connection=False" providerName="System.Data.SqlClient" />NOTE: The misspelling of "starter" in the value "aspnet_staterKits_TimeTracker"
originates from the Time Tracker application itself. - If your existing Web site resides in your hosting account root directory, add the following line of code to the Time Tracker web.config file, between the <system.web> tags:
<pages styleSheetTheme=""/> - Under the Content section of the Hosting Control Center, click the IIS Settings icon.
- Click Create Directory. Enter the name of the directory in which your Time Tracker application will reside and, then select Anonymous Access and Set Application Root permissions.
- Click Continue.
- Upload the contents of your application to the directory you specified in step 8.
For additional information about the Database Publishing Service and the Database Publishing Wizard, see the following articles:
What does my Database Publishing Wizard error mean?
Publishing a Database Using the Database Publishing Wizard