mercredi 7 mai 2008

Web deployment of .Net project

That's strong

The power of Web Deployment for Winforms

When I've to deploy a Windows Form application, usually 99% of the times I create a setup package by using Visual Studio .NET and its Setup Project: here you can create a single .msi package or multiple packages by using cabinets files (.cab) (useful if you want to deploy your application via multiple media).

With .NET 2.0 you have the possibility to use the ClickOnce technology to deploy your application. ClickOnce basically allows you to deploy Windows-based applications to a desktop by placing the application files on a Web or file server accessible to the client and providing the user with an URL. When the user clicks the link, the application files are downloaded to the user's machine and executed.

The program are executed in a secure sandbox provided by .NET code access security (CAS). When a new version of the application is deployed to the server, it can be automatically detected by connected clients, and the update can be downloaded and applied in a variety of ways based on optional deployment settings.

The .NET Framework 1.1 also includes a possibility to deploy applications in a way similar to this, a way that is not so known and used but that it's really powerful (I've choosed to use it for my last project): the Web Deployment.

But what is it? It's essentially a zero-touch deployment model that allows you to install a .NET application simply by going via browser to the proper URL where there is the application's executable file. What is wonderful is that the web server not needs to have the .NET Framework installed (it could be also a non Microsoft web server) but it's the local system's copy of the .NET Framework that handles the installation.

When you go to the proper url, the assemblies are downloaded and maintained in a download cache (unique for each user) and the installation and execution of the application uses a zone-based security model.

You can check the security zone settings simply by using the .NET Framework Configuration tool, as you can see in the figure below (I'm sorry for the italian language of my system ). Obviously, you can customize the security settings of these zones as you want, but it's not recommended.

If you're developing Windows Forms applications with .NET 1.1 and your deployment scenario is an Intranet network, I recommed this way to to: by using it, you don't require to have a distribution method to all your users. You save time and you're sure that all receives the correct version.

Alain Lompo
Excelta - Conseils et services informatiques
MCSD For Microsoft .Net
MVP Windows Systems Server / Biztalk Server
Certifié ITIL et Microsoft Biztalk Server

Aucun commentaire: