I use ClickOnce everyday for several internal applications. Recently, I had to move the publishing website to a new host. Here is how you can acheive a completely transparent move without annoying your users or forcing them to uninstall and reinstall the application. First, you need to publish the deployment files on the new server. The deployment configuration is as follows : Publishing folder : URL on the new server Installation Folder : URL on the new server Updates Folder : URL on the new server Revision : last revision + 2 (very important) Then you need to deploy a new version on the old server with an updates folder on the new server. This way, next time the application launches, it will get the new version from the new server, and voila. Here is the configuration for the last deployment on the old server : Publishing folder : URL on the old server Installation Folder : URL on the old server Updates Folder : URL on the new server Revision : last revision + 1 (very important) E...
Typical scenario: You provide the user with a TextBox he can use to type a filter over a big chunk of data that takes a lot of time to process. Most of the time, you would handle the TextChanged event of the TextBox and issue a filter operation over the data source using the character(s) available in the TextBox. Typical problem: The user complains because he has to wait between the key strokes even if he already knows a filter that would allow the search to take place in a matter of a few seconds. Solution: Introduce a delay between the last key stroke and the processing using a timer. Walkthough: Create a new Winforms project with a Form. Add a TextBox (named textBox), a ListBox (named listBox). To mimic a very slow data source, we will create a dummy class: public class VerySlowDataAccess { private static string [] data = null ; static VerySlowDataAccess () { data = new [] { "AAAAAA1" , "AAAAAA2...
In my previous post I talked about FaultExceptions and how they are transmitted from the server to the client. First, let's have a look at the sample service contract : [ServiceContract] public interface ITimeService { [OperationContract] [FaultContract(typeof(TimeExceptionDetails))] DateTime GetTime(); } The service implementation : public class TimeService : ITimeService { #region ITimeService Members public DateTime GetTime() { return DateTime.Now; } #endregion } And the Fault details class : public class TimeExceptionDetails { public static readonly TimeExceptionDetails Default = new TimeExceptionDetails(); [DataMember] public String Message { get; private set; } public TimeExceptionDetails() { this.Message = "There is a problem in the spacetime continuum, Marty"; } public TimeExceptionDetails(String message) { this.Message = message; } } Now we'll learn how to ease the process of creating FaultExceptions by using the IE...
Comments
Post a Comment