Search This Blog

Friday, October 01, 2010

How to Deploy ASP.NET Web Application in Hosting Web Server

How to deploy ASP.NET website 

All the efforts have been made to create a beautiful website at the end of the day. This is good enough to see your output in your local machine (local host). But this is not why the web applications (or websites) are actually meant for. Then, how do you make your website (your personal pages) to the general public. Then you say deploy the website (web application) to a hosting server.

Here comes the difficulty for layman (even, few of us who are familiar with technology) how to approach.

So I decided to post a details explanation with examples and screen shots to explain the same.

There are 2 ways you can publish or deploy your website
  1. Deploy the source files to the web server
  2. Deploy the pre-compiled website (Recommended)
The following are the easy steps to deploy your website (or web application) with the pre-compiled way (Will discuss the first method later)

  • Select Build -> Publish Website menu from the visual studio 2008 (or 2005) menu.
  • You will be prompted with Publish Website dialog box, where you can select the target location. Click the browse option (button)
  • You will be given with another dialog box where you can select either File System/Local IIS/FTP/HTTP.
  • Select File System and then select the appropriate folder (Make sure the folder is empty, because it will over write the contents of the selected folder) then click open.
  • Click OK 
  • The website (or web application) is compiled and the pre-compiled code will be placed in the folder that you have selected. (The default location of pre-compiled websites is :\Documents and Settings\\My Documents\Visual Studio 2008\Projects\\PrecompiledWeb\)
First part of deploying website is over. The next step will be very easy.
Copy the files in the precompiled website and place them in the wwwroot folder of your website.

You will be given with the FTP user name and password. You can use FILEZILLA (or any other ftp client) to login to your ftp site. Then navigate to the wwwroot folder.

No comments:

Post a Comment

Leave your suggession & comment...