WebMatrix is Microsoft's latest web development tool. It contains all the elements needed to build a website, but this section will explain how to use it without
WebMatrix to publish applications.Learn how to publish Web Pages applications 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).
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:
Before you proceed, make sure your host is running the latest version of ASP.NET (4.0 or 4.5).
Copy your website (all folders and content) from your development machine to the application folder on the remote host (server).
![]() | If your application contains data, do not copy the data (see point 4 below). |
---|
Make sure that the bin folder on your remote host contains the same dll files as on your development computer.
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
If your application contains data or 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 it's generally not expected.
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), 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!
That's all for publishing a Web Pages application without using WebMatrix.