"
ASP.NET (snapshot 2017) Microsoft documentation and samples

Deploying an ASP.NET Web Application with SQL Server Compact using Visual Studio: Introduction - 1 of 12

by Tom Dykstra

Download Starter Project

This series of tutorials shows you how to deploy (publish) an ASP.NET web application project that includes a SQL Server Compact database by using Visual Studio 2012 RC or Visual Studio Express 2012 RC for Web. You can also use Visual Studio 2010 if you install the Web Publish Update.

For a tutorial that shows deployment features introduced after the RC release of Visual Studio 2012, shows how to deploy SQL Server editions other than SQL Server Compact, and shows how to deploy to Azure App Service Web Apps, see ASP.NET Web Deployment using Visual Studio.

These tutorials guide you through deploying first to IIS on your local development computer for testing, and then to a third-party hosting provider. The application that you’ll deploy uses an application database and an ASP.NET membership database. You start off using SQL Server Compact and deploying to SQL Server Compact, and later tutorials show you how to deploy database changes and how to migrate to SQL Server.

The tutorials assume you know how to work with ASP.NET in Visual Studio. If you don’t, a good place to start is a basic ASP.NET Web Forms Tutorial or a basic ASP.NET MVC Tutorial.

If you have questions that are not directly related to the tutorial, you can post them to the ASP.NET Deployment forum.

Overview

These tutorials guide you through deploying first to IIS on your local development computer for testing, and then to a third-party hosting provider. The application that you’ll deploy uses an application database and an ASP.NET membership database. You start off using SQL Server Compact and deploying to SQL Server Compact, and later tutorials show you how to deploy database changes and how to migrate to SQL Server.

The number of tutorials – 11 in all plus a troubleshooting page – might make the deployment process seem daunting. In fact, the basic procedures for deploying a site make up a relatively small part of the tutorial set. However, in real-world situations, you often need information about some small but important extra aspect of deployment — for example, setting folder permissions on the target server. We’ve included many of these additional techniques in the tutorials, with the hope that the tutorials don’t leave out information that might prevent you from successfully deploying a real application.

The tutorials are designed to run in sequence, and each part builds on the previous part. However, you can skip parts that aren’t relevant to your situation. (Skipping parts might require you to adjust the procedures in later tutorials.)

Intended Audience

The tutorials are aimed at ASP.NET developers who work in small organizations or other environments where:

In enterprise environments, it’s more typical to implement continuous integration processes, and the production environment is usually hosted by the company’s own servers. Different people also typically perform different roles. For information about enterprise deployment, see Deploying Web Applications in Enterprise Scenarios.

Organizations of all sizes can also deploy web applications to Azure, and most of the procedures shown in these tutorials apply also to Azure App Services Web Apps. For an introduction to Azure, see https://azure.microsoft.com.

The Hosting Provider Shown in the Tutorials

The tutorials take you through the process of setting up an account with a hosting company and deploying the application to that hosting provider. A specific hosting company was chosen so that the tutorials could illustrate the complete experience of deploying to a live website. Each hosting company provides different features, and the experience of deploying to their servers varies somewhat; however, the process described in this tutorial is typical for the overall process.

The hosting provider used for this tutorial, Cytanium.com, is one of many that are available, and its use in this tutorial does not constitute an endorsement or recommendation.

Deploying Web Site Projects

Contoso University is a Visual Studio web application project. Most of the deployment methods and tools demonstrated in this tutorial do not apply to Web Site Projects. For information about how to deploy web site projects, see ASP.NET Deployment Content Map.

Deploying ASP.NET MVC Projects

For this tutorial you deploy an ASP.NET Web Forms project, but everything you learn how to do is applicable to ASP.NET MVC as well. A Visual Studio MVC project is just another form of web application project. The only difference is that if you’re deploying to a hosting provider that does not support ASP.NET MVC or your target version of it, you must make sure that you have installed the appropriate (MVC 3 or MVC 4) NuGet package in your project.

Programming Language

The sample application uses C# but the tutorials do not require knowledge of C#, and the deployment techniques shown by the tutorials are not language-specific.

Troubleshooting During this Tutorial

When an error happens during deployment, or if the deployed site does not run correctly, the error messages don’t always provide a solution. To help you with some common problem scenarios, a troubleshooting reference page is available. If you get an error message or something doesn’t work as you go through the tutorials, be sure to check the troubleshooting page.

Comments Welcome

Comments on the tutorials are welcome, and when the tutorial is updated every effort will be made to take into account corrections or suggestions for improvements that are provided in tutorial comments.

Prerequisites

Before you start, make sure that you have Windows 7 or later and one of the following products installed on your computer:

If you have Visual Studio 2010 SP1 or Visual Web Developer Express 2010 SP1, install the following products also:

Some other software is required in order to complete the tutorial, but you don’t have to have that loaded yet. The tutorial will walk you through the steps for installing it when you need it.

Downloading the Sample Application

The application you’ll deploy is named Contoso University and has already been created for you. It’s a simplified version of a university web site, based loosely on the Contoso University application described in the Entity Framework tutorials on the ASP.NET site.

When you have the prerequisites installed, download the Contoso University web application. The .zip file contains multiple versions of the project and a PDF file that contains all 12 tutorials. To work through the steps of the tutorial, start with ContosoUniversity-Begin. To see what the project looks like at the end of the tutorials, open ContosoUniversity-End. To see what the project looks like before the migration to full SQL Server in tutorial 10, open ContosoUniversity-AfterTutorial09.

To prepare to work through the tutorial steps, save ContosoUniversity-Begin to whatever folder you use for working with Visual Studio projects. By default this is the following folder:

C:\Users\<username>\Documents\Visual Studio 2012\Projects

(For the screen shots in this tutorial, the project folder is located in the root directory on the C: drive.)

Start Visual Studio, open the project, and press CTRL-F5 to run it.

Home_page

The website pages are accessible from the menu bar and let you perform the following functions:

Following are screen shots of a few representative pages.

Students_Page

Add_Students_Page

Reviewing Application Features that Affect Deployment

The following features of the application affect how you deploy it or what you have to do to deploy it. Each of these is explained in more detail in the following tutorials in the series.

In this first tutorial in the series, you have downloaded the sample Visual Studio project and reviewed site features that affect how you deploy the application. In the following tutorials, you prepare for deployment by setting up some of these things to be handled automatically. Others you take care of manually.

Next



Comments ( )
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnet/web-forms/overview/older-versions-getting-started/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-introduction-1-of-12.htm
< THANKS ME>