Greetings, We have an application written in .net 3.5 that uses wcf and also wpf for the purpose of presentation. We have No-touch deployment implemented so users just click on internet shortcut and application starts immediately. Sometimes, when we update application, it takes about 30minutes to update client applications, server and database. We would like to show information like "Application is updating. Please try again later" during our update job so users won't be able to run application or make any actions in case when application has been already running. How can we achive this kind of functionality? PS. We cannot use Click-Once.
A:
Create an extra method on your WCF service public bool ApplicationIsOnline()
implementation of this method: add an appsetting in the configfile of the service that indicates whether is application is online or not. When you start upgrading alter the appsetting to false, when the installation is done, alter it back to true
At the startup of your program you call this method, when the WCF call returns true you can start the application, when the call returns false you can show a message to the user to try again later.
Wouter Janssens - Xelos bvba
2010-08-10 09:11:05
ok, but I need to check this situation also when application is already running. I don't want to check it before each request so how can I achieve it?
niao
2010-08-10 09:44:35
There are 2 options for this:1: Alter all service operations to call the ApplicationOnline() and if it is false throw a specific exception that you need to catch clientside.2: Create a custom ServiceBehavior and implement the Validate method to make sure that the application is online. If not throw an exception and catch it on the client.
Wouter Janssens - Xelos bvba
2010-08-11 09:15:48