New Posts New Posts RSS Feed: Notification Service & Timeout
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Notification Service & Timeout

 Post Reply Post Reply
Author
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Topic: Notification Service & Timeout
    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


Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post 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.


Hope this helps.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down