ASP. NET Web Pages-published websites, asp. netpages

Source: Internet
Author: User

ASP. NET Web Pages-published websites, asp. netpages
Learn how to publish a Web Pages application without using WebMatrix.

Publish your application without using WebMatrix

You can use the Publish command in WebMatrix (Visual Web Developer or Visual Studio) to Publish the ASP. NET Web Pages application to a remote server.

This function copies all application files, cshtml Pages, images, and all required DLL files for Web Pages, Razor, Helpers, and SQL Server Compact (if a database is used ).

Sometimes we do not want to use these options. Maybe your host provider only supports FTP? Maybe your website is based on ASP? Maybe you want to copy these files yourself? Maybe you want to use other release software?

Do you have any problems? Yes, yes. But we can solve it.

To copy a site, you need to know how to reference the correct files, what DLL files are copied, and where they are stored.

The procedure is as follows:


1. Use the latest version of ASP. NET

Before you proceed, make sure that your host runs the latest ASP. NET version (4.0 or 4.5 ).


2. Copy a Web Folder

Copy the website (all folders and content) from the development machine to the application folder on the remote host (server.

If your application contains data,Do not copy the data(See step 4 below ).


3. DLL file

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

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

  • Microsoft. Web. Infrastructure. dll
  • NuGet. Core. dll
  • System. Web. Helpers. dll
  • System. Web. Razor. dll
  • System. Web. WebPages. Administration. dll
  • System. Web. WebPages. Deployment. dll
  • System. Web. WebPages. dll
  • System. Web. WebPages. Razor. dll
  • WebMatrix. Data. dll
  • WebMatrix. WebData


4. Copy Data

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

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

Generally, this is not required.

If your development machine has test data, it may overwrite the data on the remote host.

If you have to copy the SQL database (. sdf file), you may delete all the data in the database and copy the empty. sdf file to the server from the development computer.

That's all. Good luck!


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.