Understanding Publish Feature in Visual Studio 2005 for Web
Studio 2005 has features that can used to publish a website in a production server
or a staging server. The copy web site tool and the publish web site utility are
the two tools that are available for this purpose. Using these tools are very
easy than it was done in the earlier versions of the software.
the latest version of the Visual Studio there is a tool called the Copy Web Site
tool. With this tool you can just copy the entire web site to the target server.
You can also use the Publish Web Site utility for publishing your website. This
utility compiles your web site into executable files.
The conventional method is to create a website and then deploy it in the production server. It is also possible to create a FTP (File Transfer Protocol) Web Site so that you can access the hosted server directly and edit the files in it. In this method you can directly work with the files in the hosted server. This method is very fast and easy to work on the web site. More information on this method is available in the MSDN website.
The copy web site tool available in the Visual Studio 2005 can be easily compared to the FTP utility. With this utility you can open a directory in the production server and then upload the files necessary to that directory from the local website you have in your system. Earlier versions of Visual Studio used a Copy Project utility for this purpose. The copy web site tool in the latest version of Visual Studio has improved features than the Copy Project Utility.
Some of the improvements in this tool are that there is no need for compiling the files before you move them to the target server. All you have to do is to simply copy the .aspx and the class files. Any other source files necessary are also copied to the target server. The compilation takes place dynamically when the file is requested.
web site that is supported in Visual Studio can be opened or copied using the
Copy Web Site tool. The production server in which the files of the website are
copied need not have the FrontPage Extensions in it. Files supported by IIS, Remote
IIS, and FTP can be opened using the copy web site tool.
One another interesting feature of the Copy Web Site tool is that it places a file called App_Offline.htm to the target servers root directory before it copies the files to the target server. So, when somebody accesses the website while the files are being copied the user is redirected to the App_Offline.htm which displays a friendly message that states that the website is being updated. After the files are copied the file App_Offline.htm is deleted by the Copy Web Site tool.
Walkthrough on how to use this utility is available in the MSDN website. You can use this to see how to use the Copy Web Site tool. .Net framework 2.0 should be available in the production server if you want the web site to behave as you expected. You can open and edit the files in the production server directly if the production server is an FTP Server. You can also administer the website using the ASP.Net Web Site Administration Tool available for this purpose.
Pre-compilation is done when you use the Publish Web Site utility that is available in the Visual Studio 2005. Only after compilation that files are copied to the production server in the directory of your choice. When the website is compiled using the Publish Web Site utility the source code is removed from the files and stub files are used. When a request comes to the page the precompiled assemblies are used.
is a marked difference in the pre-compilation process in the Publish Web Site
utility. In the earlier version the code files were only compiled. The code files
were compiled into a single assembly. But in the Publish web site utility you
can compile the markup in the .aspx optionally. With the Publish Web Site utility
the standalone classes are compiled in to a separate class and the pages with
code are compiled into individual assemblies.
Pre-compilation in the Publish Web Site utility helps you in identifying the compile time errors earlier than in the earlier versions. With this the response is quicker than the earlier versions. This utility also compiles the Web.Config file. This helps in tracking the compile time errors that are present in the configuration file.
out the MSDN documentation for walkthrough of the features like this present in
the latest version of Visual Studio 2005.
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________
to our mailing list and receive new articles
: We never rent, trade, or sell my email lists to
Visit .NET Programming Tutorial Homepage