How do I publish a Web Pages without using WebMatrix?

Source: Internet
Author: User
Tags compact classic asp
Learn how to publish a Web Pages application without using WebMatrix.

Publish your application without using WebMatrix

By using the Publish command in WebMatrix (or Visual Studio), you can publish an ASP. NET Web Pages application to a remote server.

This feature copies all of your application files, cshtml pages, images, and all required DLL files for Web pages, Razor, Helpers, and SQL Server Compact (if you use a database).

Sometimes you don't want to use WebMatrix to publish your application. Perhaps because your hosting provider only supports FTP, perhaps you already have a website based on a classic ASP, perhaps you want to copy all the files yourself, perhaps you want to use Front Page, Expression Web and other publishing software.

Are you experiencing problems? Yes, it will. But you have a way to solve it.

To perform site replication, you must know how to reference the correct files, which DLL files need to be copied, and where to store them.

Please follow these steps:

1. Use the latest version of ASP.

Before you continue, make sure that your console is running the latest version of ASP. NET (4.0 or 4.5).

2. Copying Web folders

Copy your Web site (all folders and content) from your development computer to the application folder on the remote host (server).

If your application contains data, do not copy the data (see 4th below).

3. Copying DLL files

Make sure that the Bin folder on your remote host contains the same DLL file that you have on your development computer.

After you copy the Bin folder, it should contain the following files:

Microsoft.Web.Infrastructure.dllNuGet.Core.dllSystem.Web.Helpers.dllSystem.Web.Razor.dllSystem.Web.WebPages.Administratio N.dllsystem.web.webpages.deployment.dllsystem.web.webpages.dllsystem.web.webpages.razor.dllwebmatrix.data.dllwebmatrix.we Bdata

4. Copy your data

If your application contains data or a database. For example, in the SQL Server Compact database (an. sdf file in the App_Data folder), consider the following points:

Do you want to publish your test data on a remote server?

Most of the time generally do not want to.

If you have test data on your development computer, it will overwrite the production data on your remote host.

If you must copy the SQL database (. sdf file), you should delete all data from the database and then copy an empty. sdf file from your development computer to the server.

That's it. Good luck!

"Recommended"

1. ASP. NET free Video Tutorials

2. Share the ASP. NET Learning Notes (1)--webpages Razor

3. Share the ASP. NET Learning Notes (2)--webpages Introduction

4. Share the ASP. NET Learning Notes (3) Webpages layout

5. Share the ASP. NET Learning Notes (4) folder

6. Share the ASP. NET Learning Notes (5) global page AppStart and Pagestart

7. Share the ASP. NET Learning Note (8) Webpages Helper

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.