Publishing Web Sites
There are two ways of publishing websites in ASP.NET with Visual Studio:
- Using the Copy Web Site Tool from Visual Studio
- Using the Publish Web Site Tool from Visual Studio
Copy Web Site Tool:
Consider using the Copy Web Site Tool when you cannot open the remote site as Remote IIS Site, and need more power over it than a simple FTP Web Site. It supports synchronization which makes sure that all files in both sides are up to date.
When using the Copy Web Site Tool, essentially you are working with two web sites at the same time. The source site, which is the site opened in Visual Studio, and the remote site, where you want to copy the content of the source site. With synchronization enabled, you can choose between the versions of the files you want to hold, or discard. It also enables multiple developers to work on the same site in the same time.
The DOS command line tool named XCOPY has the same advantages as the Copy Web Site Tool, and it doesn’t require Visual Studio to be installed on your computer.
Publish Web Site Tool:
The Publish Web Site Tool is an entirely different approach than the Copy Web Site Tool. With Publish Web Site, you can precompile a web page, so that the first user’s first requests won’t be delayed by the dynamic compilation of the pages. It also helps you protect your code, since it is able to merge all your source code files into a single assembly. A great advantage is it also checks for errors in your application, which would otherwise be discovered by an unnoticing user.
There are a couple of publish settings in Visual Studio. For example, by checking the Allow this precompiled site to be updatable box, you will be able to update the layout of the .aspx files later (but not the code). Check the Enable strong naming on precompiled assemblies box to name strongly named assemblies using a key file, etc.
If you don’t have Visual Studio installed, you can use the aspnet_compiler tool for the same effect on your web application.
I'm a software developer professionalizing in the .NET platform and iOs development. Here you can find my notes for Microsoft certifications.
Everyone who seeks, finds
- .NET (35)
- .NET 70-536 (35)
- Configuration, Diagnostic, Management and Installation Features (6)
- Globalization, Drawing and Text Manipulation (2)
- Improving the Security of a .NET Framework Application (5)
- Interoperability, Reflection and Mailing Functionality (3)
- Serialization and IO Functionality (7)
- Service Processes, Threading and Application Domains (2)
- System Types and Collections (6)
- .NET 70-536 (35)
- ADO.NET (24)
- ASP.NET (68)
- Application Architecture (1)
- ASP.NET 70-562 (44)
- PRO ASP.NET 70-564 (20)
- Design Patterns (10)
- Objective-C (4)
- Personal (4)
- Silverlight (6)
- SQL Server (43)
- 70-433 (27)
- 70-451 (16)
- WCF (8)
- Windows Azure (8)
- WPF (20)