We can use the Web Deployment plug-in for Visual studio 2005
given by Microsoft for creating Web deployment projects for 2.0 Applications,
where we can compile in release mode for 1.1 applications for deployment. See
the reference section for more details on Web Deployment plug-in. Copy the
application to a folder location where the application needs to be deployed on
the server. Make all Web.Config changes, like updating connection strings, if
there is any appsettings values changes corresponding to production
environments, etc.
Virtual Directory
An IIS Virtual Directory is essentially an alias to the
physical directory. The IIS Virtual Directory is a directory name which may be
accessed from the Internet to access the physical directory on the server.
The most common ways of creating virtual directory is done through
two methods.
1.
Using IIS Manager
2.
Using Windows Explorer
Using IIS Manager
We can open IIS manager in 3 ways:
·
Type Inetmgr in RUN
·
Open Control Panel > Administrative tools > Internet
Information Services
·
Right click My Computer, click Manage and expand Internet
Information Services
Creation
Doing any of the above approach will bring us the IIS
manager.
1.
Expand the local computer node, right click the Website under which you
want to deploy the application and click New > Virtual Directory. It will
bring a dialog like Figure 1.
Figure 1 - Create Virtual Directory
Click Next.
2.
It will bring the next window for entering “Alias” for our websites. See
Figure 2.
Figure 2 - Virtual Directory Alias
Type the alias
name you would like to assign for the applications virtual directory. I have
used “test” for this article. Click Next.
3.
It will bring a window for linking our website's physical directory with
virtual directory.
Figure 3 - Physical Directory Path
Browse to the location and select the website folder. Click
Next.
4.
This will bring the window for specifying access permissions for the
users. Select appropriate permissions.
Figure 4 - Virtual Directory Access Permission
I have not changed the default setting in this window as
this permission is more than enough to run most of the applications. Click
Next.
5.
Click Finish. Thus we have created the virtual directory.
Using Windows Explorer
1.
Browse to the folder location where you copied the application and right
click the folder and click “Sharing and security.”
2.
Open “Web Sharing” tab and select “Share this folder” which will ask for
the Alias. Type an Alias name, click OK and click OK again. We have created
virtual directory through windows explorer.
Configure ASP.NET version
Sometimes the server we are deploying may have both 1.1 and
2.0 framework installed. So we need to configure the applications to use
appropriate framework. It can be done through the ASP.NET tab of virtual
directory property box like in Figure 5.
Figure 5 - ASP.NET version picker
If it is 2.0 Application, select 2.0.xxxxx version or else
1.1.xxxx.