Skip to main content
Email Password   helpLost your password?

 

Introduction :

Visual Studio 2005 IDE provides us some useful way to deploy our web sites on Web Server (IIS).  Maximum times we are going to deploy our application by creating Virtual Directory on IIS and this is the best way to deploy . But some times we need to do deploy our applications directly from VS also. Visual Studio includes features that integrate with IIS and allow us to create Virtual Directories with in Visual Studio IDE.

Visual Studio Provides Three Important Features to deploy our web sites

Creating Virtual Directory At The Time Of Creating New Web Project :

From Visual Studio when we are create a web sites simultaneously create a virtual directory for that web sites. In General case we create a web sites in our local system and Visual Studio used it own built in web server to run that application. But if we want do so , Visual Studio won't use its Built-in web server to deploy the sites rather that a Request will send to IIS and then IIS will taking care of  it. Now Let See, How to do so.

Steps:

  1.   Visual Studio  > File > New Web Sites

VS20054.jpg

         In that Screen , Select HTTP in Location Field instead of  File System (By Default) . Now Just Write the URL for that application ,as given in picture. Visual Studio will create a Virtual Directory on IIS with named "mydemosites" .  Now If that Virtual Directory already exists , It will not create  it, it will just use the existing one.

2. Click on OK. Check the Solution path . its is in local host

VS20053.jpg

Visual Studio Does nor provide limited number of functionality of IIS Manager. We can create a Virtual Directory with existing application.

Step :

  1. Click on Browse Button of New Window [ shown in First Image ] 

  2. Select Default Web Sites

VS20055.jpg

   3. Click On Create Virtual Directory, Give Alias name and Folder Path

VS20056.jpg

Now, This approach has certain limitation,

Limitation :

Using Copy Web Tool :

Visual Studio also provide another useful control transfer our web application files directly from Visual Studio.

Steps:

1.  Your  Web Sites > Right Click > Copy Web Site.

2. Click on Copy Web Site... Following Screen will come

VS20059.jpg

In copy web tool , There are two window, one is current location, which is our local solution file and another id remote site that is our target location. First of all we have to set the target server , to enable the area.  For that we need to click on Connect

VS200510.jpg

Now , a new window will come , using which we can specify location for remote web site

VS200511.jpg

After  , Specify the Location , we will have the enabled Remote Server Section and enabled button to copy files.

VS200512.jpg

Publishing web site :

This features gives us to deploying our application to a production server and keep the source code secure Visual Studio Publishing Features use aspnet_complier command line utility to secure our code. it will just publish the sites with compiling that code. we just need to deploy the it on IIS server. There are only a few steps.

Steps :

  1. Right Click on Web Site > Publish Web Site

VS200513.jpg

2. Set the location for your publishing, you can directly Deploy to IIS or the set location as earlier that already discussed., Check the allow this precompiled site to updateable, this will help you to change effects on client site code on you live site with out recompile.e.g, suppose you need to change a alert message , for that just change on client code and it will reflected on live sites , for that you do not need to recompile

This are three approaches provide by the VS2005. Hope You enjoyed the article.

Point of Interest:

This are some quite interesting approches to deploy our application in IIS through Visual Studio

Reference:

Copy Web Tool MSDN

Publish Web Site MSDN

History:

Written on Sunday, Octbor 19, 2008

 

 

You must Sign In to use this message board.
 
 
Per page   
  
-- There are no messages in this forum --


Last Updated 19 Oct 2008 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009