Home > Backend Development > C#.Net Tutorial > How to publish Web Pages without using WebMatrix?

How to publish Web Pages without using WebMatrix?

零下一度
Release: 2017-05-27 15:58:40
Original
1426 people have browsed it

Learn how to publish a Web Pages application without using WebMatrix.

Publish your application without using WebMatrix

You can publish an ASP.NET Web Pages application to a remote server by using the publish command in WebMatrix (or Visual Studio) superior.

This feature copies all your application files, cshtml pages, images, and all necessary DLL files for Web Pages, Razor, Helpers, SQL Server Compact (if using a database).

Sometimes you don't want to use WebMatrix to publish your application. Maybe it's because your hosting provider only supports FTP, maybe you already have a classic ASP based website, maybe you want to copy all the files yourself, maybe you want to use Front Page, Expression Web, or some other publishing software.

Will you encounter problems? Yes, it will. But you have a way around it.

To perform a website copy, 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.NET

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

2. Copy the Web Folder

Copy your website (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 point 4 below for details).

3. Copy the DLL file

Make sure that the bin folder on your remote host contains the same dll file as on your development computer.

After copying the bin folder, it should contain the following files:

Microsoft.Web.Infrastructure.dllNuGet.Core.dllSystem.Web.Helpers.dllSystem.Web.Razor.dllSystem.Web.WebPages.Administration.dllSystem.Web.WebPages.Deployment.dllSystem.Web.WebPages.dllSystem.Web.WebPages.Razor.dllWebMatrix.Data.dllWebMatrix.WebData
Copy after login

4. Copy your data

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

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

Most of the time, I generally don’t want it.

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

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

That's it. GOOD LUCK!

【Related recommendations】

1. ASP.NET free video tutorial

2. Share ASP.NET study notes (1) --WebPages Razor

3. Share ASP.NET study notes (2)--WebPages Introduction

4. Share ASP.NET study Notes (3) WebPages layout

5. Share ASP.NET study notes (4) Folder

6. Share ASP.NET study Notes (5) Global page AppStart and PageStart

7. Share ASP.NET study notes (8) WebPages Helper

The above is the detailed content of How to publish Web Pages without using WebMatrix?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template