Creating a website without the use of WebMatrix is an increasingly sought-after skill in web development. By utilizing the publish command within WebMatrix or Visual Studio, developers can easily upload a ASP.NET WebPages application to a remote server. This functionality copies all application files, cshtml pages, images, and essential DLL files for WebPages, Razor, Helpers, SQL Server Compact (if a database is used) to the destination server.
Nevertheless, there are certain circumstances under which you might opt not to use WebMatrix for publishing your application. Perhaps it’s because your hosting service provider only supports FTP, or maybe you already have a classic ASP-based website. Alternatively, you may want to manually copy all files or seek alternative methods like using FrontPage or ExpressionWeb.
You may wonder – will you encounter any issues? The answer is yes, but don’t worry, there are ways to solve them.
To execute the website replication process, you’ll need to know how to properly reference the necessary files, identify which DLL files must be copied, and determine the correct location for storing them. Follow these steps:
-
Ensure that you have the latest version of ASP.NET installed on your host before proceeding.
-
Copy the Web Folder
- From your development computer, transfer all your website’s folders and contents to the application folder on the remote host.
-
Copy DLL Files
- Confirm that the bin folder on your remote host contains the same DLL files as those on your development computer.
- After copying the bin folder, it should include these files: Microsoft.Web.Infrastructure.dll, NGet.Core.dll, System.Web.Helpers.dll, System.Web.Razor.dll, System.Web.WebPages.dll, System.Web.WebPages.Administration.dll, System.Web.WebPages.Deployment.dll, WebMatrix.Data.dll, WebMatrix.WebData4.dll.
-
Copy Your Data
- If your application includes data or databases (such as a SQL Server Compact database in an .sdf file within the pp_Data folder), take note of these points:
- Before replicating any data to the remote server, consider whether you want to publish your test data. Often, it’s advisable not to.
- If there are test data on your development computer, it may overwrite the production data on the remote host.
- Should you decide to copy the SQL database (.sdf file) to the server, delete all existing data in the database first and then transfer a blank .sdf file from your development computer to the server.
- If your application includes data or databases (such as a SQL Server Compact database in an .sdf file within the pp_Data folder), take note of these points:
And that’s it! Good luck with your website creation process.