VisualBuilder
  Home > Dotnet > Tutorials > Deployment in .Net - .NET Tutorial
Tell a friend
Link to us
Total Members
      Members: 84606
     
Sitemap Forum Chat
Home
.NET Tutorial Home
1 . Overview of .Net Framework
2 . .Net Components:
3 . CLR (Common Language Runtime)
4 . Steps to Run a program in CLR
5 . Assembly
6 . GAC (Global Assembly CACHE)
7 . Strong Name in .Net Assembly
8 . ILDASM: Intermediate Language Disassembler in .Net
9 . Custom Attributes in .Net
10 . Application Domain in .Net
11 . Code Access Security in .Net
12 . Type System in .Net -1
13 . Type System in .Net -2
14 . Reflection: Inspection of a Type\'s Metadata
15 . Introduction to Generics
16 . Generic Classes and Methods
17 . Generic Methods in .Net 2.0
18 . Overview of Inheritance in Generics classes
19 . Connection pooling in .Net Applications
20 . Deployment in .Net
 
Dotnet Group Home
Dotnet Discussion (9)
Dotnet Members (2825)
Dotnet Resources
Dotnet Source Code (0)
Dotnet Articles (0)
Dotnet Blogs
Dotnet Jobs
Dotnet Components (2)
Dotnet Books
Dotnet Websites (43)
Dotnet News (186)
Dotnet Q & A (3)
- Dotnet Ask Question
- Dotnet Questions
- Dotnet Unanswered Questions
 
GROUPS
.NET
ASP.NET
.NET
C#
ASP
Visual Basic
Java
Java
JSP
EJB
Other
Delphi
C++
Ajax
UML
JavaScript
PHP
Web Design
Web Hosting
SQL Server
Oracle
Project Management
More Groups

 
LEARNING CENTER
TUTORIALS
.NET
.NET Tutorial
ASP Tutorial
ASP.NET Database Tutorial
ASP.NET Development Tips
ASP.Net Security,Internationalisation And Deployment
ASP.NET Server Controls Tips
ASP.NET Tutorial
C Sharp Tutorial
Web Development
Flex Tutorial
HTML Tutorial
Learn AJAX Tutorial
PHP Tutorial
Software Development
Database Tutorial
SQL Tutorial
UML Tutorial
Java
Ant Tutorial
EJB 3 Tutorial
Hibernate Tutorial
Java Tutorial
Java Web Component Tutorial
Java XML Tutorial
JDBC Tutorial
JDK1.5 Tutorial
JSF Tutorial
JSP And J2EE Design Tutorial
JSP Tutorial
Spring Tutorial
Struts Tutorial

RESOURCES
Q & A (432 )
Source Code (3217 )
Articles (11 )
Components (1589 )
News (880 )
Websites (1207 )

SUBMISSIONS
Submit Article
Submit Website
Submit News
Submit Source Code
Submit Component

COMMUNITY
Members Directory
Discussion Forum
Chat

SITE
About Us
Sitemap
Search
Contact Us
Link To Us
Feedback
Tell a Friend
Partners
Advertise


Dotnet Tutorial
 Deployment in .Net
  << Prev: Connection pooling in .Net Applications

Microsoft with its .NET Framework brings in some novel, flexible and easy way to deploy the developed Windows and Web applications. The .NET Framework offers many characteristics that make it easier to deploy the applications. These features are as follows:



  • No-touch deployment: .NET Framework gets rid of DLL conflicts. Installing or removing of components does not affect other applications. Thus it provides a solution to “DLL Hell” problem. No-impact applications, which offers application isolation and purge DLL conflicts.

  • Controlled code sharing: Sharing is explicit rather than the default.

  • XCOPY deployment and reproduction: XCOPY deployment is appropriate to be used in certain specific simple deployment scenarios. With Self-described and self-contained components and applications there is no need for registry entries or dependencies. This facilitates to install desktop applications on client machines using a remote web server.

  • Integration with the Windows Installer: Advertisement, publishing, repair, and install-on-demand are all on hand when deploying the application. In Visual Studio.NET the deployment tools are built on the groundwork of Windows Installer, which offers rich capabilities for swift deploying and easy maintenance of applications.

  • Private components by default: By default the components are deployed to the application directory.

  • Side-by-side versioning: We can run one version of the application side-by-side (The CLR can manage multiple versions of a software component to be run concurrently) with another version. We can also decide which versions to employ, and versioning policy is enforced by the common language runtime.


In Visual Studio.NET if you compile a project, the code-behind class file (.aspx.vb, or .aspx.cs) is compiled into a .dll file along with all other class files which are incorporated with the project. If a request is made for that ASP.NET page, then the .dll file is instantiated and executed. You can modify the visual elements of Web form pages without recompiling and redeploying. But you can't change the code without recompiling. Usually the .dll file is stored in the web application's bin directory.


There are methods for deploying ASP.NET applications.



  • XCopy deployment.

  • Setup Wizard


 


XCopy Deployment:


 


The easiest method to copy a project or application from one location to another is to employing XCopy. XCopy deployment is a trouble-free technique to install simple .NET applications. Usually this method is not employed in the Windows due to the convolution and COM/COM+ Component registrations. In the past, for registering the components we have to employ Regsvr32.exe utility etc.


 


Typically for deploying an application we copy the application or component into the virtual directory of the Web server. With self-describing assemblies and versioning to the .NET Framework, there are no more registry entries, which facilitate to make use of XCOPY for deployment.


 


In ASP.NET, XCopy deployment refers to copy required files from one location to another location (Virtual directory on the Web server) by employing the drag-and-drop feature in Microsoft Windows Explorer, File Transfer Protocol (FTP), or the DOS XCopy command.


 


XCOPY deployment is accomplished from the command prompt. You use the XCOPY command to specify the source directory and the target directory. The /s flag indicates that subdirectories are to be copied as well. For example, the following command-line command is used to copy the MyApplication directory and all subdirectories from drive D to drive C:


 


XCOPY D:\MyApplication C:\MyApplication /s


 


To deploy your application using XCOPY


•  Verify that your application meets the requirements for XCOPY deployment.


•  Open the command window. To locate the command window in Microsoft Windows XP, click Start, All Programs, Accessories.


•  Run XCOPY from the command prompt, specifying the source and destination directories and including any command-line flags, such as the /s example cited previously .


SetUp Wizard


VS .NET installer provides you with the functionality where you can distribute your Web application as a collection of build outputs, installer classes, and database creation scripts; it is often easier to deploy complex solutions with Windows Installer files. VS .NET provides Web setup projects that can be used to deploy Web applications. These Web setup projects differ from standard setup projects in that they install Web applications to a virtual root folder on a Web server rather than in the Program Files folder, as is the case with the applications installed using standard setup projects.


The Windows Installer divides applications into the following three levels.



  • Product:- It is something a user can install. For example, MS Word is a product that a user can install.

  • Feature:- A product is composed of multiple features. A feature is also the smallest unit of functionality of a product. For example, AutoCorrect functionality can be considered a feature of MS Word.

  • Component:- A component can be considered the smallest unit that can be shared across multiple features and components. It is very important to understand that the component in Windows Installer terms is not the same as the term component in the .NET Framework. A Windows installer component can be a single file or multiple files that logically belong together. It can be an executable, a dll, or a simple text file. A collection of components can form together to provide a feature and it is also possible for a component to be shared across multiple features. While features are specific to a product and identified by a name unique only within the product, components are global across all products installed on a machine. For example, the spell checker component of MS Word can be shared across all the applications that want to implement spell-checking feature.


Creating a Web Setup Project Using VS .NET Installer


Step1: First Go to File>Add Project>New Project from the main menu. In the New Project dialog box, select setup and deployment projects from the Project type's pane and then select Web Setup project in the template pane.


Step2: After creating the project, you then need to add the output of the primary assembly and the content files of the ASP.NET Web application to the setup project. Right click on the particular project and then in the solution explorer and select Add->Project Output from the context menu. In the Add Project Output Group dialog box, select the “application” from the Project combo box and select Primary Output from the list.


Step3: After adding the project output, you then need to add the related Content Files (such as .aspx files, Images, and so on) to the project. To do this, again bring up the Add Project Output dialog box and then select Content Files from the list this time.


Step4: Configuring Properties through the Properties Window: There are a number of properties that you can set through the properties window of the Web Setup project. These properties determine the runtime display and behavior of the Windows installer file. The properties window provides properties such as Author, Description, Manufacturer, Support Phone and so on that can be very useful to the users (who are installing your application) of your application to get more details about your application.


Note:- Once we through with this, the .msi file are there where we can use it to install the Asp.Net Web Application.


 


  << Prev: Connection pooling in .Net Applications
Dotnet Tutorial Home
Give feedback and win a prize.

 
   Printer Friendly
   Email to a friend
   Add to my Favourites    
  Download PDF version
   Report Bad Submissions
   Submit Feedback
 
  Delicious   Digg   Technorati   Blink   Furl   Reddit   Newsvine   Google Click each image to add
this page to each site.
 
 
Welcome Guest Signup
MEMBER'S PANEL
EMAIL
PASSWORD
Forgot your password?
New User? Click Here!
 
Resend Activation Email!
 
SEARCH
 
 
LINKS
MSN
Video Surveillance
Exchange Hosting
Gift to Pakistan
 
ADVERTISEMENT
 
PARTNER LIST

More
 
 
 

Home | Login | About Us | Contact Us | Privacy Policy | Advertising