Click Here to Install Silverlight*
IndiaChange|All Microsoft Sites
Microsoft
Communities 
 
Chat Transcript
 
Chat Topic : Deploy Windows Forms like Web Applications – ClickOnce
Chat Expert : Abhishek Kant
August 17, 2005
 
 
subhashini (Moderator):
Hi all , a very good evening to all of you :)
subhashini (Moderator):
Welcome to today's chat on Deploying windows Forms like Web Applications - Click Once by Abhishek Kant ( CPM, Microsoft India)
subhashini (Moderator):
To give a quick intro about him
subhashini (Moderator):
Abhishek is the Community Program Manager for India. He is responsible for identifying and managing community in India .
He is passionate about empowering and enabling the communities. He has done his B.E. in Chemical Engg. and MBA from NMIMS, Mumbai. He is a Microsoft Certified Application Developer (MCAD) Charter Member on the .NET platform. He has worked with BizTalk Server 2004 and the Solution Accelerators team. He likes to ponder on business issues as much as the technical intricacies. Abhishek can be reached at: abhishek@microsoft.com.
subhashini (Moderator):
You can also catch him blogging often about community at http://abhishekkant.blogspot.com/
subhashini (Moderator):
As always , few chat rules just before we begin
subhashini (Moderator):
Please refrain from sending any private messages to the expert during the chat
subhashini (Moderator):
Chat Procedures:
This chat will last for one hour. During this hour, our Experts will respond to as many questions as they can. Please understand that there may be some questions we cannot respond to due to lack of information or because the information is not yet public. We encourage you to submit questions for our Experts
subhashini (Moderator):
We ask that you stay on topic for the duration of the chat. This helps the Guests and Experts follow the conversation more easily. We invite you to ask off topic questions after this chat is over.
subhashini (Moderator):
So let's get the chat rolling and hope all of you enjoy this one hour chat session.
subhashini (Moderator):
let us welcome Abhishek
abhishek (Moderator):
Hi Everyone
abhishek (Moderator):
It is a pleasure to talk about one of the new features in the core .NET 2.0 framework - ClickOnce
abhishek (Moderator):
I would like to begin with the history of the deployment in Microsoft Technologies:
abhishek (Moderator):
1. At the dawn of MS technologies, we built COM applications and then built Deployment applications in VS 6.0
abhishek (Moderator):
2. When .NET 1.0 was introduced, we moved away from the DLL Hell and moved into the realm of assemblies (private and public)
abhishek (Moderator):
3. With .NET 1.1, deployment became more secure with introduction of partially trusted assemblies
abhishek (Moderator):
that would enable applications to run in CAS sandbox and not do anything that it was not supposed to do
abhishek (Moderator):
4. At this time PAG group released an application block called Updater Application Block. Simultaneously, there was another technology developed called BITS.
abhishek (Moderator):
5. In .NET 2.0, all the work done before it was assimilated into a technology called ClickOnce.
abhishek (Moderator):
ClickOnce is a new technology in .NET 2.0 that allows you to deploy and automatically update applications over an Intranet or the Internet.
abhishek (Moderator):
At the same time it is not appropriate for all applications (you wouldn't deploy MS Office with ClickOnce), it should make deployment much better for many line-of-business apps.
abhishek (Moderator):
The world today benefits from Web Applications primarily due to 2 reasons:
abhishek (Moderator):
1. No deployment required really. It is as simple as clicking on a link or typing a URL and using the web application
abhishek (Moderator):
2. No update hassles. Once a web server is updated all the people accessing the web application, get to access the latest build.
abhishek (Moderator):
But Web Applications have the following drawbacks:
abhishek (Moderator):
1. They still do not offer the richness of the Windows Applications
abhishek (Moderator):
2. you have to be online all the time if you have to use Web application
abhishek (Moderator):
ClickOnce brings the benefits of the web applications detailed above and takes away the drawbacks making it a compelling technology to use today and in future.
abhishek (Moderator):
With “ClickOnce” running a Windows Forms application is as simple as clicking a link in a web page. For administrators, deploying or updating an application is simply a matter of updating files on a server; no need to individually touch every client.
abhishek (Moderator):
Applications installed through ClickOnce are completely self-contained & install per-user, meaning no-admin rights are required.
abhishek (Moderator):
“ClickOnce” applications can be deployed via web servers, file servers or CDs. A “ClickOnce” application can choose to be installed, meaning it gets start menu & add/remove program entries, or an app can simply be run & cached
abhishek (Moderator):
“ClickOnce” applications run in a secure sandbox provided by the CLR Code Access Security model. For applications that need a higher level of trust, “ClickOnce” supports both a user prompting model and an enhanced security policy pre-deployment mechanism for administrators.
abhishek (Moderator):
"ClickOnce" is supported by a rich progamming API (System.Deployment.Application) that can be used to do very imaginative things like install on demand, incremental download
abhishek (Moderator):
Please feel free to ask me questions using the "ask the expert" checkbox located next to the Send button
abhishek (Moderator):
Hope this has given the capability overview of ClickOnce technology of .NET 2.0
abhishek (Moderator):
Not only is ClickOnce a deployment technology but also a very robust update mechanism
abhishek (Moderator):
and the beauty of the whole framework is that it is fully supported and integrated into Visual Studio 2005
abhishek (Moderator):
You don't have to write a SINGLE line of code to get the broad range of functionality that we discussed above. In some situations you might want to leverage the ClickOnce API for your applications.
abhishek (Moderator):
the only prerequisite for ClickOnce is that the target clients should already have the .NET Framework 2.0 installed.
abhishek (Moderator):
Q: Since ClickOnce depends on .NET Framework 2.0 does the client have the option of uninstalling .NET Framework 2.0 if he has issues with .NET Framework 1.1 applications
A: i am not sure of the question that you are asking me. Are you asking me can .NET Framework 2.0 be uninstalled from the system? Yes, like previous .NET frameworks .NET 2.0 supports side by side installation and can be removed if you so desire.
abhishek (Moderator):
ClickOnce technologies are still in development and have seen changes from VS 2005 Beta 1 to VS 2005 Beta 2. It is probable that there might be changes before VS 2005 is released in the market.
abhishek (Moderator):
At this time please feel free to ask me questions on ClickOnce....
abhishek (Moderator):
Q: Happy to see your message abhishek
A: it is nice to have you here. please feel free to ask me questions related to ClickOnce technologies.
abhishek (Moderator):
Q: pls tell us what is Clickonce
A: We have already covered most of the this in theory. In short, ClickOnce is a technology by which you are able to deploy and update rich windows applications through the web interface
abhishek (Moderator):
Let us launch into the architecture behind ClickOnce and then we will see tool support in VS 2005 Beta 2.
abhishek (Moderator):
Q: where do i get those theory
A: refer to the Expert Chat window. I will be pointing to more resources by the end of the chat too.
abhishek (Moderator):
The Win Form binaries have to get compiled as usual.
abhishek (Moderator):
when we include ClickOnce deployment, two extra manifests get generated - a. Application Manifest b. Deployment Manifest
abhishek (Moderator):
The Application Manifest is like your VS .csproj / .vbproj file containing the list of the assemblies that constitute an application.
abhishek (Moderator):
The Deployment Manifest refers to the location of the Application Manifest and the version of the application. This is the endpoint which is referred to through the web.
abhishek (Moderator):
the user clicks on the link to reach the deployment manifest. The deployment manifest then points to the application manifest and the application manifest provides the location of the assemblies.
abhishek (Moderator):
The assemblies themselves are physically located on the web server as well.
abhishek (Moderator):
So there are 2 distinct processes in the deployment methodology: 1. Staging 2. Launching
abhishek (Moderator):
Staging is when all the assemblies are loaded on the web server
abhishek (Moderator):
Launching is when a client refers to the deployment manifest and launches the application
abhishek (Moderator):
Q: Hi abhishek.I have a basic doubt, can I add Bootstrapper functionalities ie; if target machine don't have dotnet framework installed i need to detect it and install it first from server..?
A: Yes. This functionality has been added in the Beta 2. You can install pre-requisites (especially .NET framework) from the web interface directly. If you have some other dependencies, you can point to the relevant website.
abhishek (Moderator):
Q: i used a dll in my win app and i deployed it.If i change my dll contents, simply copying & pasting the dll is enough to work with the updated one.
A: no it is not. the information about updated assemblies is stored in the manifests. you will need updated manifests if the application on the client has to be updated using the latest assemblies. you can update it using SDK tools or using the VS 2005 support by re-publishing the application.
abhishek (Moderator):
Q: Do I need to stop the client application to update it thru ClickOnce...In the web form scenario, I just click "Refresh". How is it achieved in winForms
A: Good question. when clickonce is started off a URL, it checks for an update. If the application is already running this opportunity is not there. However, you can use the ClickOnce API, to force a check for update and then download the required assemblies. If the assembly is to be loaded later you can load it once it is downloaded while the application is running.
abhishek (Moderator):
Q: Can we handle Patch management with ClickOnce in WinForms App'ns
A: yes we can. if i understand you correctly you want to issue patches for your applications. you can do that by re-publishing the application and the next time the application starts it will update itself with the new assemblies. Patch done.
subhashini (Moderator):
We have the last 10 mins for the chat to conclude .
subhashini (Moderator):
Request all of you to wind up your queries or email Abhishek at abhishek@microsoft.com with your queries.
abhishek (Moderator):
Q: what is the underlying mechanism in clickonce to download the assembly that is how the downloader is different from http and bits downloader and what are the fusion caching changes?
A: today the download doesn't use BITS. System.NET class libraries are used to do it’s downloads.
in the longhorn timeframe, clickonce might start using the BITS framework. Clickonce doesn't use the GAC either. it maintains its private cache.
abhishek (Moderator):
Q: Is there any relation ship exists for click once with replication?
A: Replication is relevant to DB technologies. This is application deployment and updation. this doesn't have relation to replication technologies.
abhishek (Moderator):
Q: All the patches don't require a restart of application. Like some windows updates..... For example, I have a winForm wwith menus. User is working on one menu, I want to update another menu, without letting the user to know abt the patch/update..
A: that's what i mentioned. if you are going to be using an assembly that is not loaded currently but might be needed in future, you might be able to download it and update it without restarting the application. However, in most cases a restart is required.
abhishek (Moderator):
Q: Replication deals the same (Updation of patches)
A: could you please elaborate on this? what replication are you referring to? DB or something else?
abhishek (Moderator):
In the final phase, let us discuss the VS 2005 Beta 2 support for ClickOnce
abhishek (Moderator):
It is as easy as Right Clicking the project name in Solution Explorer and clicking on the Publish menu..
abhishek (Moderator):
a wizard steps you through the final options involved in actually publishing the application to a deployment server so that it can be presented to ClickOnce clients.
abhishek (Moderator):
There are additional ClickOnce options that affect the way the application will be updated, and these options can be accessed through the Project Properties dialog.
abhishek (Moderator):
Under Project Properties, there are two new subsections of project settings: Security and Publish
abhishek (Moderator):
There is also signing Tab that you need to use for signing the manifests.
abhishek (Moderator):
The Security section allows you to specify which permissions the application needs to execute. These requirements get published as part of the application manifest and are used on the client to determine whether to prompt the user to allow elevated permissions for the application.
abhishek (Moderator):
The SDK provides some tools that you can use to modify the manifests as well - MageUI.exe under \Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
abhishek (Moderator):
Q: Using this click once technology and while publishing it there is some warning indicating security what's it how can we rectify it
A: Yes. At the security tab of Project Properties, VS 2005 can help you calculate the permissions required for the application. You can then further fine tune the permissions. also, you can specify the Zone from where the clickonce application will be running i.e. internet zone, intranet zone or a custom zone. VS 2005 even lets you test the application under simulated conditions of the zone you are going to use later.
abhishek (Moderator):
Q: While publishing its showing an error window as unknown publisher
A: ClickOnce needs a trusted publisher. For testing purposes you can generate a test certificate to sign from the Signing Tab of the Project properties. While actually deploying the application you can use the widely accepted publishers who exist in the trusted publishers root in the machines e.g. Verisign
abhishek (Moderator):
Q: Can we change the options in Test Certificate
A: what options are you referring to in test certificate? Since this is a test certificate you are not allowed to change anything there. It is meant for individual machine that the developer is working on
subhashini (Moderator):
This brings to the end of the chat. Please feel free to email Abhishek for any queries
subhashini (Moderator):
at abhishek@microsoft.com
abhishek (Moderator):
Q: In Security they are indicating Partial Security what does it mean
A: explaining Partial Security mode is a BIG topic in itself. In short, it was introduced in .NET 1.1. When you declare a .NET application as partially trusted (that you always should - BEST practice) you benefit from the CAS sandbox. Your code will need explicit permissions from the admin to do certain activities e.g. access the IO system, access registry etc. this makes the code more secure and less prone to doing unintentional damage to the system.
abhishek (Moderator):
Q: Thanks a lot Abhishek
A: your welcome.
subhashini (Moderator):
Thanks to Abhishek for delivering such an informative chat session and hope all of you enjoyed it.
subhashini (Moderator):
Thanks to all of you for attending this chat and hope you found it informative .
abhishek (Moderator):
Q: When will be the next chat to share the technologies
A: We conduct chats every week on Wednesday from 5:00 to 6:00 PM.
subhashini (Moderator):
The chat transcript will be available at http://www.microsoft.com/india/communities/chat/Transcripts.aspx
subhashini (Moderator):
please volunteer to host any webchat by emailing us at commind@microsoft.com
subhashini (Moderator):
or indiamvp@microsoft.com
subhashini (Moderator):
Thanks again and have a lovely evening :)
abhishek (Moderator):
Finally, few resources to get more information on ClickOnce:
subhashini (Moderator):
Please pour in your feedback about these chats at commind@microsoft.com
abhishek (Moderator):
<http://msdn.microsoft.com/msdnmag/issues/04/05/ClickOnce/>
abhishek (Moderator):
http://msdn.microsoft.com/smartclient/understanding/windowsforms/2.0/features/clickonce.aspx
abhishek (Moderator):
http://www.windowsforms.net/FAQs/default.aspx?PageID=1&CategoryID=24&tabindex=2
abhishek (Moderator):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/ClickOnceVS05.asp
abhishek (Moderator):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/clickoncetrustpub.asp
subhashini (Moderator):
Thanks again and enjoy your evening .:)
abhishek (Moderator):
If you would like to try hands on lab for Clickonce: http://msdn.microsoft.com/vstudio/tryit/hosted/vstudio2005/clickoncedeployment/
abhishek (Moderator):
Catch more discussions on ClickOnce at: http://forums.microsoft.com
abhishek (Moderator):
Thanks for your time today and enjoy the "smart client" experience on Win Form applications!
subhashini (Moderator):
thanks to Abhishek and all of you
 
     

©2009 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement