.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

WCF One-Way Callbacks Timing Out?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :WPF

How is this possible?  I thought one way calls were fire and forget.  The method is marked as one-way.  The callback concurrency mode is set to Multiple and the UseSychronizationContext of the callback class is set to false.  The data being sent is not more than 1KB yet every time I send about 30-40 small messages concurrently, the calls start to block and eventually some of them timeout.

I noticed that on the first batch of messages I get dropped connections and time outs randomly.  On the next batch, they come in instantly.  Then if I try a batch again maybe a minute later, its back to coming in slow.  This is atrocious performance, I'm seriously considering changing all my messaging to smart sockets or something.  i have never seen such poor performance in a messaging layer, the fact that it's unpredictable is what gets me.  Either be slow or fast, don't be one or the other every few minutes. 

View Complete Post

More Related Resource Links

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

WCF Tutorial - Events and Callbacks

we described how to make a very simple client/server application where clients would call functions on the server through a shared interface. In this tutorial, I'm going to expand that application to allow the server to execute functions on the client by using callbacks. Essentially, this is WCF's mechanism to allow events to be raised from the server to it's connected clients.

WCF Callbacks Hanging WPF Applications

I have a WPF application that communicates with a pretty basic WCF service. Whenever a callback is issued in the middle of a request, the WPF application completely hangs. It's obviously a synchronization issue, however I've gone through the forums and articles and set every imaginable attribute on every imaginable object with no successful outcome.

WCF Essentials: What You Need To Know About One-Way Calls, Callbacks, And Events


Object and component-oriented programming have only one way for clients to call a method, but Windows® Communication Foundation introduces two more. In this article Juval Lowy explains how they work.

Juval Lowy

MSDN Magazine October 2006

Cutting Edge: Custom Script Callbacks in ASP.NET


ASP. NET client callbacks represent a neat and elegant way to execute server-side code without posting and refreshing the current page. I discussed ASP. NET callbacks in the August and December 2004 installments of Cutting Edge, considering them from the perspective of rendered pages making background callbacks to the server, sending input data to the relevant page, and receiving a response.

Dino Esposito

MSDN Magazine January 2005

Cutting Edge: Implications of Script Callbacks in ASP.NET


Script callbacks in ASP. NET 2. 0 is a feature whose time has come. Script callbacks can significantly speed up an application by limiting server postbacks. They also allow you to execute small portions of server-side code without having to manage the view state for reading or writing.

Dino Esposito

MSDN Magazine December 2004

Cutting Edge: Script Callbacks in ASP.NET


If you're involved in Web development you may have faced a problem that you couldn't find a good solution for-making client-to-server calls outside the current page. For example, you might want to validate the content of a textbox against data stored on the server asynchronously, without interrupting the continuity of the work or without forcing a full page refresh, which is particularly heavy for UI-rich pages.

Dino Esposito

MSDN Magazine August 2004

Basic Instincts: Implementing Callbacks with a Multicast Delegate


This month's column is a follow-up to the December 2002 installment in which I introduced the basic concepts and programming techniques associated with delegates. I am going to assume you have already read that column and that you are familiar with the fundamentals of programming delegates.

Ted Pattison

MSDN Magazine January 2003

Workflow timing issues?


I am creating a new workflow using SPD on MOSS 2007, SP2, and having a problem with it.

The workflow is fairly basic, where when a user creates a new infopath form it sends an email to another person, who enters some info, then selects where it get's routed to next.  There are 3 more similar processes before the form is marked as completed.  At each step the WF emails the person selected as next reciepient and updates a "flag" saying which step the process is in.

The problem is that sometimes when I update a form, (all emails come to me since it's still in testing), the workflow stops with a message of "Failed on Start (retrying)".  After doing some digging I found this link:


So I went in and added an action for every update I do to first check the document out, do the update, and then check the document back in.  Well the problem I get now is that the WF fails with a message about unable to check the document back in.  I tried troubleshooting it by putting in WF Stop and Log entry actions to try to figure out exactly where the problem was happening.

I thought I had fixed it

Getting comfortable with Javascript callbacks


It seems every language has it's own way of implementing callbacks.

Back in the VB days (daze?) we used the addressof operator and all kinds of win32 stuff to get app and activex control to do what we wanted.

In C#, we have the delegate (and the anonymous delegate) that makes life pretty easy in terms of defining how to subscribe to a callback "even" and how to broadcast that callback.


Javascript callbacks are the simplest, and arguable the more nebulous, implementation of them all.  Once you understand how callbacks work, using libraries like jQuery, and our own UGC Javascript API becomes much easier.

Why do we need it?

Think of the way code normal iterates from line to line.  It's straightforward and simple: you loop over a list, and at the end of the loop, you keep going; you use an if statement, and after that you know that the condition has been met; similarily, when you call a method, you know that it has done all of its work and returned something useful.  Right?  Well. not always.  Sometimes that method will invoke web requests that need some time to process, or it may call another method that has to do some processing or is waiting for

SoundPlayer Load / Play timing

I'm trying to create an application where I need sounds to play and pictures to appear at very precise times. So I have a sound that is suppose to play at, let's say 100 ms after something else happened. I'm using SoundPlayer.Play to play the sound on a Thread.Timer tick and that seems to work. However, the first play is slightly delayed (by ~40-50 ms) because it has to load the .wav file before it can play it. So, I tried using SoundPlayer.Load to load the file before I need to play the sound. However, this doesn't seem to make a difference. The only way I can make sure the first play occurs at the right time is to play the sound in advance (before opening the Window where all this occurs). Why doesn't SoundPlayer.Load seem to actually load the wav file completely? And how can I make sure the sound is loaded (preferably without having to play it).

Asynchronous callbacks not getting fired in asp.net web parts

I am trying to create a portal making use of asp.net Web Parts, Web Part Zones and WebPartManager. I have created a custom control as my webpart by inheriting from the standard Web Part. Inside the Web Parts I am making use of controls (3rd party) which allow asynchronous callbacks. However my asynchronous callbacks are not getting trigerred from the web part. I am creating the web part and the web part zones at runtime. The structure of my WebPart is as follows <Button><ClientSideClick = "CallBackMethod" </Button> <GridView></GridView> protected CallBackMethod() { RefreshGrid() } Whenever I click on the button the Page_Init of the aspx page on which the webpart gets executed recreating my webpart and webpartzone and also the CreateChildControls method gets executed but the callback event does not trigger. Has anyone faced something similar?

got a question about timing response from the IIS webserver for ASP.NET & WCF

Hi, I am developing an ASP.NET web forms that will talk to IIS 7.0 (WAS & application pool). I read that if the IIS receive requests and the WCF service is busy with a previous request, it will start up another worker thread to process the user request so that the user do not have to wait for a long time and time out.. How do I configure or  code the IIS to get a good acceptable timing response? what is an acceptable time response? Beside buying load balance hardware and software, can I just configure the IIS to instantiate up to a max number of additiona worker thread of that popular WCF service in the application pool to process all the requests to avoid the request just sitting in the queue for too long? Any help is greatly appreciated...   

Distributed Query Timing out



We have created a linked server to a SSAS 2008 Cube on our SQL 2005 server , and tested this..Works fine. Now we are trying to run a MDX query through OPEN QUERY from our server. The query runs for about 10 minutes and times out. So we set the Remote Query timeout to "0" on our server and ran the OPEN QUERY. But still it times out after 10 minutes or so.

Any suggestion to solve this issue?

Thanks in Advance!


Please solve the Database problem (calculate the in and out timing) screech Card in and out timings.

Hey, Dear Friends.. Goody, I need a help from you people. Those who know the more database(prosegers) please salve this problem. The following is my database table. In that, want to calculate each employee out time and in time. I mean how much hr they are spending out side of the company and how much hours they are spending inside of the company in that day. Thanks in Advance. SuraReddy. Emani empcode CardNo emp_code_name time IOGateNo Door in_out date 0022 0022 XYZ 09:09:50 02-1 MAIN DOOR(I/O) Entry 2010-09-08 0022 0022 XYZ 09:50:40 02-5 MAIN DOOR(I/O) Exit 2010-09-08 0022 0022 XYZ 10:02:31 02-1 MAIN DOOR(I/O) Entry 2010-09-08 0022 0022 XYZ 11:31:56 02-5 MAIN DOOR(I/O) Exit 2010-09-08 0022 0022 XYZ 11:45:25 02-1 MAIN DOOR(I/O) Entry 2010-09-08 0022 0022 XYZ 13:48:51 02-5 MAIN DOOR(I/O) Exit 2010-09-08 0022 0022 XYZ 14:30:25 02-1 MAIN DOOR(I/O) Entry 2010-09-08 0022 0022 XYZ 16:16:15 02-5 MAIN DOOR(I/O) Exit 2010-09-08 0022 0022 XYZ 16:33:27 02-1 MAIN DOOR(I/O) Entry 2010-09-08 0022 0022 XYZ 18:40:58 02-5 MAIN DOOR(I/O) Exit 2010-09-08 0022 0022 XYZ 09:04:41 02-1 MAIN DOOR(I/O) Entry 2010-09-09 0022 0022 XYZ 10:21:22 02-5 MAIN DOOR(I/O) Exit 2010-09-09 0022 0022 XYZ 10:30:06 02-1 MAIN DOOR(I/O) Entry 2010-09-09 0022 0022 XYZ 12:44:43 02-5 MAIN DOOR(I/O) Exit 2010-09-09 0022 0022 XYZ 09:08:24 02-1 MAIN DOOR(I/O) Entry 2010-09-14 0022 0022 XYZ 09:43:29 02-5

Which profiler events I need to capture to find out timing out queries?



I understand how can I capture long running quieries based on duration. But I'm trying to figure out how I can do it with quiry which are timing out? For example if ASP.NET executes a query against SQL server and it did not completely within say 60s, will that even be written in profiler as RCP:Completed or it would not be written at all since ASP.NET will kill connection at that point and return error to user?





which approach is better? client side callbacks or ajax using json for programming?


Hello! Friends,

                   I just wanted to know whether clientside callbacks or ajax is better for programming? I want to develop a webbased ERP. 


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend