Showing posts with label Deployment. Show all posts
Showing posts with label Deployment. Show all posts

Wednesday, 27 February 2013

Silverlight Deployment


1.       What is the single unit for deploying Silverlight applications?


Silverlight applications are downloaded by the browser in XAP files.

2.       What are xap files?


                XAP files are essentially .zip files that contain an assembly manifest file and one or more assemblies.

3.       Can an APACHE server host a Silverlight application?


              Silverlight applications can be hosted on most types of Web servers, like Internet Information Server (IIS) or Apache. However, most Web servers are usually configured to serve only a short list of wellknown file extensions.

4.       What are the MIME types your web server should support to host Silverlight application?


Extension
MIME type
.xaml
application/xaml+xml
.xap
application/x-silverlight-app



IIS 7, included in Windows Server 2008, already includes all the relevant MIME types for both WPF and Silverlight, including both .xap and .xaml extensions, so if you're using Windows Server 2008, you're all set.
5.       How can you optimize xap file size for increasing download speed?

a.       Set CopyToLocal as false

By default, any non-system assemblies that you reference will be added to the XAP file generated by Silverlight applications. If you want to optimize your XAP files for download speed, this behavior may not be efficient for some of your modules' references.

Consider the following example. You have created an application with several remote modules. Each module gets its own XAP file. You have also created a shared Common assembly that contains shared services, common interfaces, and so on. Each module references that common assembly. By default, each XAP file will now also contain the Common assembly; this makes the XAP files larger than they need to be.

b.      To solve this, change the references to the Common assembly in all of the modules by setting Copy Local to false. This ensures that the Common assembly is not added to the XAP files.

When deploying Silverlight applications created with the Composite Application Library, some common assemblies that can typically be excluded from the XAP files include Composite and Composite.Presentation assemblies and infrastructure assemblies, among others.


6.       How can you deploy Silverlight app.

c.       You can do it using a SMS server.

d.      Manually

e.      Group policy

Group policy is ideal to deploy Silverlight in small to medium sized organizations or when it is not being deployed to a large number of users simultaneously.  For large organizations, Silverlight is best deployed using SMS or another third-party software distribution tool.  A limitation of the group policy deployment method is that it applies only to Microsoft operating systems, ignoring Apple operating system clients. 


7.       How do you know if the problem which has occurred is a web browser problem and not a Silverlight issue?


To isolate browser issues that might be related to the Silverlight add-on, you can selectively disable the add-on in Internet Explorer 7.

To disable a browser add-on

a.       Click the Tools menu, click Manage Add-ons, and then click Enable or Disable Add-ons.
b.      Change the “Show” Drop-down box to “Add-ons that have been used by Internet Explorer”
c.       Click AgControl Class, click Disable, and then click OK.

Alternatively, you can turn off all add-ons temporarily in Internet Explorer 7 by starting in No add-ons mode.

To start Internet Explorer 7 in No add-ons mode

a.       1.    Click Start, click All Programs, and then click Accessories.
b.      2.    Click System Tools, and then click Internet Explorer (No Add-ons).

You can also start Internet Explorer without add-ons by right-clicking the Internet Explorer icon on the desktop and then clicking Start Without Add-ons. Or start Internet Explorer with no add-ons or toolbars by running the command iexplore.exe -extoff.


8.        What is difference between asp.net application hosting and Silverlight hosting?

Deploying Silverlight applications is as easy as deploying ASP.NET applications, because Silverlight is normally embedded in a site.


9.       To install a Silverlight RIA Services application, do we need RIA services installed in the server machine?

To run Silverlight RIA services application we need .NET 4 installed on the server machine. RIA Services must also be available on the Web server.



The RIA Services assemblies must be available on the Web server. It is recommended that RIA Services be installed on the Web server that will host your application. If this is not an option, due to lack of permissions or some other issue, you can also make them available on the Web server by either including them in the bin folder of your project when it is published or by installing them in the global assembly cache (GAC).

 To install RIA Service RC on your server, download the MSI locally and then run it as such -

msiexec /i RIAServices.msi /SERVER=true

 If you have access to a .NET 4 RC server but do not have permissions to install RIA Services on it, you can choose to carry the RIA Services bits in the Web Applications BIN folder.

 10.   What all should you consider while preparing a WCF RIA Service application for deployment?

Following is what is needed:

·         System.ServiceModel.DomainServices.Server.dll

·         System.ServiceModel.DomainServices.Hosting.dll

·         If you are using Entity Framework to access a database, then you will also need to add a reference to the System.ServiceModel.DomainServices.EntityFramework.dll assembly.

·         If you are using LINQ to SQL to access data, then you will need to add a reference to the Microsoft.ServiceModel.DomainServices.LinqToSql.dll assembly

If you are using the Visual Studio Build->Publish option to deploy your application, make sure the following three assemblies under the Web Application->References have been marked as Copy Local = True


11.   Ideally where should my RIA service dlls lie in GAC or in bin?

Instead of copying the RIA Services assemblies in the Bin folder of every project that uses them, you can install the assemblies in the GAC. Any assemblies in the GAC are available to every application on the server. This approach is easier to maintain because an assembly only needs to be updated in the GAC instead of every Bin folder.

If you are copying the bits over manually to your deployment server, copy the above three assemblies to the Web Applications BIN folder right next to your [WebAppName].dll


12.   What is need to make the assemblies Copy Local = True?

Setting these property values to True results in the assemblies getting copied to the bin folder the next time you build the solution. When the assemblies are copied to the bin folder, they will be copied to the Web server when you publish the site.


13.   Why my installation works in some PCs and fails to run in other PCs?

Generally this happens because it makes zero sense to have Copy Local = True if an assembly is installed in the GAC.

Because the local copy will never be used, the GAC is always searched first. Leaving it unchanged would cause major confusion. Changing it causes a confusion too, that could perhaps have been addressed with a message box at solution load time.

To overcome this problem you can also add a PostBuild event to manually copy the assemblies into the output directory.


14.   Why Copy Local for some dlls is true by default whereas for some others it is true?

The project-assigned value of CopyLocal is determined in the following order:

1.       If the reference is another project, called a project-to-project reference, then the value is true.

2.       If the assembly is found in the global assembly cache, the value is false.

3.       As a special case, the value for the mscorlib.dll reference is false.

4.       If the assembly is found in the Framework SDK folder, then the value is false. Otherwise, the value is true.


15.   What are the things you need to take care in web.config file while deploying a RIA service?


Monday, 5 November 2012

Macros Vs Package Vs AddIns - Visual Studio

To extend visual studio there are three options provided by Microsoft in VS 2010
a. Macros
b. Package
c. Add-Ins

In this article let us see what are these three different options to extend visual studio and  what are the various features available and which one is better?

What is a Macro??

A macro is a series of commands and instructions that you group together as a single command to accomplish a task automatically.
Macros allow you to automate repetitive actions.
Visual Studio includes the Macros integrated development environment (IDE), which is used solely for creating, manipulating, editing, and running macros.
The Macros IDE is separate from the Visual Studio IDE.

What is an Add-In??

 An add-in is a compiled DLL that runs inside the Visual Studio integrated development environment (IDE).
The fact that it is compiled protects your intellectual property and improves performance.
While you can create add-ins manually, it is far easier to use the Add-In Wizard through Visual Studio.
The Add-In Wizard creates an add-in with a fully functional but basic framework that you can run immediately after you create it and later you can customize is for your benefits.


What is a Package??

 Package is another extensibility feature offered by Microsoft.
The majority of Visual Studio’s functions you use in your everyday work (such as programming languages, editors, designers and debuggers) are provided by Visual Studio Integration Packages, or shortly by packages.
They are called VSIP/VSIX packages.
VSIP acronym is overloaded: while the first two letters means “Visual Studio” the last two may mean either “Integration Package” or “Industry Partner”.
VISX is Visual Studio eXtensibility.





 

Thursday, 25 October 2012

Building a simple package in VS 2010


In this blog we will see how to create a vsix in visual studio 2010.
VSIX is visual studio package file that conforms to the ECMA Open Packaging Conventions (OPC) standard.
You create a.vsix file when you create a project using visual studio package.
 

Since, it’s just a wizard .It becomes very easy to follow:
Packages are nothing but strongly named assemblies. Class libraries need to be signed with a key.
You can choose the language in which you want to create this package. Also,the wizard gives you the option either to use your own key file to sign, else you can create a new key file.(Whether it’s an existing key or a new key , you will find the key related info key.snk file in the solution.)
 Next,Wizard asks you for your basic informations like comapny name , logo , package name etc , the information from this page will be used in creating an about box.

 
 
 
 
 
 
 


You can change data here. We will discuss on the vsix versioning in the third blog in this series.
Next , the wizard asks you for package options. I selected menu command and clicked next.
If you want you can go with Tool Window or a custom editor as well.

 
 
 
 
 
 
 


Next,
The wizard asks you for a few more details on menu command to create , like the name you want to see and the id this particulat item will have.
 

 
 
 
 
 
 


In the final step you are asked if you need automated unit test cases and integration test cases to be created.

 
 
 
 
 
 
 
Clicking on Finish creates the solution for you. And Yolla! Your first package is created.
 
 
 
 
 
 



We will look at the Solution structure created in the next blog.

Friday, 29 June 2012

Deployment-Process





1.       What are various different deployment activities?
a.       Release
The release activity follows from the completed development process. It includes all the operations to prepare a system for assembly and transfer to the customer site. Therefore, it must determine the resources required to operate at the customer site and collect information for carrying out subsequent activities of deployment process.
b.      Install and activate
Activation is the activity of starting up the executable component of software. For simple system, it involves establishing some form of command for execution. For complex systems, it should make all the supporting systems ready to use.
In larger software deployments, the working copy of the software might be installed on a production server in a production environment. Other versions of the deployed software may be installed in a test environment, development environment and disaster recovery environment.
c.       Deactivate
Deactivation is the inverse of activation, and refers to shutting down any executing components of a system. Deactivation is often required to perform other deployment activities, e.g., a software system may need to be deactivated before an update can be performed.
 The practice of removing infrequently used or obsolete systems from service is often referred to as application retirement or application decommissioning.
d.      Adapt
The adaptation activity is also a process to modify a software system that has been previously installed. It differs from updating in that adaptations are initiated by local events such as changing the environment of customer site, while updating is mostly started from remote software producer.
e.      Update
The update process replaces an earlier version of all or part of a software system with a newer release.
f.        Built-In
Mechanisms for installing updates are built into some software systems. Automation of these update processes ranges from fully automatic to user initiated and controlled. Norton Internet Security is an example of a system with a semi-automatic method for retrieving and installing updates to both the antivirus definitions and other components of the system. Other software products provide query mechanisms for determining when updates are available.
g.       Version tracking
Version tracking systems help the user find and install updates to software systems installed on PCs and local networks.
Web based version tracking systems notify the user when updates are available for software systems installed on a local system. For example: Version Tracker Pro checks software versions on a user's computer and then queries its database to see if any updates are available.
Local version tracking system notifies the user when updates are available for software systems installed on a local system. For example: Software Catalog stores version and other information for each software package installed on a local system. One click of a button launches a browser window to the upgrade web page for the application, including auto-filling of the user name and password for sites that require a login.
Browser based version tracking systems notify the user when updates are available for software packages installed on a local system. For example: wfx-Versions is a Firefox extension which helps the user find the current version number of any program listed on the web.
h.      Uninstall
Uninstallation is the inverse of installation. It is the removal of a system that is no longer required. It also involves some reconfiguration of other software systems in order to remove the uninstalled system’s files and dependencies.
i.        Retire
Ultimately, a software system is marked as obsolete and support by the producers is withdrawn. It is the end of the life cycle of a software product.

2.       What are the various processes, you follow to deploy your application?
To deploy anything we need to follow following steps:
a.       Plan the deployment
b.      Design and Test the deployment strategy.
c.       Deploy the application
d.      Maintain the application
3.       What do you do when you are planning for deployment?
a.       Know the User’s computer’s system requirements.
b.      Evaluate the systems for compatibility.
c.       Identify your deployment method.

4.       What are the various factors you should consider while creating a deployment plan/coming up with a deployment strategy?
The deployment plan outlines the scope, approach and execution planned for the deployment of the project deliverables. The plan includes, where relevant, information about system support, issue tracking, escalation processes, roles and responsibilities before, during, and after deployment. The deployment plan is intended to provide clients, stakeholders and support personnel with a smooth transition to the new product or software being deployed. The deployment plan describes each step of the deployment process at each deployment location, whether there is one site or multiple sites, or one deployment or a phased deployment planned. The Deployment Plan defines all of the work steps for complete deployment, and who does them.


5.       What information needs to be gathered to create a deployment plan?
·         Deployment goals and critical success factors
·         Roles and responsibilities of the parties involved in the deployment of the project deliverables
·         Task and resource dependencies
·         How team members will communicate
·         How to track issues and resolve them
·         Contingency information
·         Training plan

6.       What are the contents of a deployment plan
Outcomes
Description
Release Plan
Describe the activities for a phased implementation or rollout. Track the dates for the release of various functions, and/or track the formal review points in the testing cycle of your product. Your release plan may also include the following activities, as appropriate:
·         Preparation of the environment
·         Conversion information
·         Product installation information
·         Distribution details
·         Data Migration
Production Readiness
Create a Product Implementation Task List. Describe what preparation is required for this new tool or application to operate. Specify any features that need modification to adapt to the new product. Identify the steps necessary to assist the user in preparing for this new product.
Communication Plan
Develop a plan to communicate with all interested parties of this project (stakeholders, sponsors, users, developers) This planning ensures that everyone who needs to be informed about project activities and results gets the needed information in a timely manner.
Issue/Change Request Tracking Method
Use a tool to record:
Project issues and their associated actions and owners
Project decisions and reasons
Contingency Plan
Plan for what to do when something goes wrong. Develop a business resumption plan and comprehensive statement of action.
Training Plan
Outline the training timeline and describe the approach, activities and tasks necessary at each point in the deployment.
7.       How do you come up with a deployment method?
a.       Evaluate the infrastructure available: It should not be like end user uses a LINUX system and you are developing a Silverlight app.
b.      Understand the security requirements thoroughly: It should not be like the user is not allowed to access internet and your updates are available only through internet.
c.       Understand user’s perspective and user’s location: User should not be a mobile user and your application a purely intranet app.

8.       When is the deployment plan written?
   The Deployment planning begins in the design phase and continues throughout the project lifecycle.

9.       Who owns the deployment plan?
The deployment plan is typically drafted by the Project Manager, but its development is a team effort.

10.   What should a release note contain?
  • Release Number
  • Release Date
  • Features Released
  • List of known issues
  • Issues Fixed in this release
  • Link to installation document
  • Link to database
  • Link to test cases
  • Link to user manual


11.   How do you deploy reusable user controls?
There is an interesting side application of Web deployment projects that solves a problem that has plagued ASP.NET developers for years-how to
create reusable user controls to share across applications. User controls are fundamentally just composite custom controls whose child controls
are laid out in an .ascx file. The ability to use the designer for laying out controls and adding handlers is a huge benefit for most developers since
 it feels almost identical to building a page, except that the resulting .ascx file can be included as a control in any page. The disadvantage has
always been that you need the physical .ascx file in the application's directory to actually use it. Techniques for making .ascx controls shareable
 across applications are available, but they usually involve chores like creating shared virtual directories between applications or harvesting
 temporary assemblies generated by ASP.NET at request time, and they've never been satisfactory.
The introduction of the aspnet_compiler.exe utility in version 2.0 brought us much closer to a decent solution. With the compiler, you can create
 a Web site consisting of only user controls and publish the site in non-updateable mode using the compiler to generate reusable assemblies. 
Once you have the resulting assembly (or assemblies), you can then deploy to any Web application and reference the user control just as you
 would a custom control (not by using the src attribute as you would for .ascx files). The only disadvantage to this technique is that you either
 have to accept the randomly named assembly produced by the compilation process or select the fixednames option in the compiler to 
generate a fixed named assembly for each Master Page in the site (not a single assembly for the entire collection).
Web Deployment Projects provide the final step to create truly reusable user control assemblies. You can take the same 
Web site consisting exclusively of user controls and add a Web Deployment Project to create a single output assembly with 
the name of your choice. It's even straightforward to create a signed assembly to deploy to the GAC for sharing controls across multiple 
applications without redeploying the assembly in each /bin directory.