Print Page | Close Window

Notification Service & Timeout

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3267
Printed Date: 22-Apr-2026 at 1:47am


Topic: Notification Service & Timeout
Posted By: pponzano
Subject: Notification Service & Timeout
Date Posted: 15-Feb-2012 at 8:29am
Hello IdeaBlade,
I've set up a notification service on my WPF n-tier application, since some user have restricted policy on our customer's enviorment and cannot open specific port, is there a way of avoiding the client to attend the timeout?

I register to the Notification this way

public void RegisterCallBack(string serviceTypeName, string serviceMethodName, Action<SubscriptionOperation> callback, object userToken, params object[] clientArgs)

     {

         try

         {

             Manager.RegisterCallback(serviceTypeName, serviceMethodName, callback, userToken, clientArgs);

         }

         catch (Exception ex)

         {

             //log

         }

     }

But this turns an exception after the timeout... is there a way of checking if it can register callback? otherwise is there a way of setting a timeout to 5 seconds? in the worst case the final user won't get the user notification but it's not a huge problem...
Thanks





Replies:
Posted By: DenisK
Date Posted: 15-Feb-2012 at 5:06pm
Hi pponzano,

You can check for EntityServerError by registering to EntityManager.EntityServerError event before registering your callback.

I've attached a sample for Web.config and App.config. Look for <wsDualHttpBinding> under the <bindings> section. You can set 4 different timeouts there.

uploads/912/sampleConfigs.zip - uploads/912/sampleConfigs.zip

Hope this helps.



Print Page | Close Window