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

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

AutoResetEvent.WaitOne not waiting.

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :.NET Framework
I have some code: 
    public static List<BsiOrderHeaderType> OrderHeaderExecuteSearchByEmailAddress(IBsiDataConnection orderConnection, string emailAddress, IBsiDataConnection buyseasonsConnection)
      AutoResetEvent doneEvent = new AutoResetEvent(false);
      Dictionary<Guid, string> orderList = new Dictionary<Guid, string>();
      List<BsiOrderHeaderType> result = new List<BsiOrderHeaderType>();
      using (IBsiDataCommand command = orderConnection.CreateCommand("proc_GetOrdersByEmailAddress"))
        command.Parameters.Add(new SqlParameter("@EmailAddress", SqlDbType.NVarChar, 50));
        command.Parameters["@EmailAddress"].Value = emailAddress;

View Complete Post

More Related Resource Links

Editor's Note: new Thread(ReadEditorsNote).Start(); yourAttention.WaitOne();


Introducing the issue, Howard Dierking points out that you can't simply parallelize your code blindly if you expect to truly reap the benefits that parallelism promises.

Howard Dierking

MSDN Magazine October 2008

Wicked Code: The SQL Site Map Provider You've Been Waiting For


Now that ASP.NET 2.0 is a shipping product, it seems appropriate to revisit an issue that tops the new features wish lists of many developers: a SQL ServerT site map provider.

Jeff Prosise

MSDN Magazine February 2006

Nintex Workflow Error: No workflows are waiting for a BizTalk message [...] No processing has been d



I created a Workflow with Nintex Workflow 2007 (on SharePoint 2007) to send/receive data to BizTalk 2009. It worked fine already. But now I get the following error mesage in the EventViewer:

Nintex Workflow; Build: 11000 (http://ls457/_layouts/nintexworkflow/BiztalkHandler.ashx)
No workflows are waiting for a BizTalk message with message Id of 'GeneralAccessRequest_2010-08-23T15_00_04_44961212B370C554EDFAC41C1201ED6CEFB' on teamsite http://ls457/sites/testapp. No processing has been done.

What could that mean? Any ideas? I definitely changed nothing on the orchestration or BizTalk administration. The BizTalk action sends the data correctly to it's destination (database), but it seems that nintex doesn't receive any return data. I don't think it's a BizTalk problem, because in the BizTalk Message Tracking Database the Message is listet, so it has been sent correctly by BizTalk. But the handler probably has problems to find/receive this message.

Kind regards,


The operation 'xxxxx' could not be completed because the sessionful channel timed out waiting to r




I am getting following error while invoking a callback method.


"The operation 'NotifyPackageDownloadProgress' could not be completed because the sessionful channel timed out waiting to receive a message.  To increase the timeout, either set the receiveTimeout property on the binding in your configuration file, or set the ReceiveTimeout property on the Binding directly."


Can anybody help me how to resolve this issue.


Thanks & Regards,


Displaying waiting image when page is loaded in asp.net



I want to display gif image when a page is loaded...

I have a dropdown list when this is selected Gridview is populated with data from database..

I want to show a gif image when this gridview is populated...

how to implement this without AJAX...





SP Workflow issue -> "The item is currently locked for editing. Waiting for item to be checked in o



I'm getting the above issue with my List Workflow.  I've created a workflow that assigns column data to a file when it is created.  This works some of the time; however, at random intervals the workflow will get stuck with "In Progress" status for the reason listed above.  The only way to clear this status is to delete the workflow and republish it.  This happens when copying a document via the UI, as well as when copying a document via UNC path.  

If I terminate the workflow for the stuck item, when I go back to run it manually, the workflow isn't even listed.  Looking at the Visio history for the item, it seems to be getting stuck at different methods within the workflow; sometimes it gets stuck at a logic method, other times at a data manipulation method.  And other times it runs through fine without any issues.  This is all happening with the same file used as a control, so it's not like I'm introducing variable triggers to the methods in this workflow.



Ajax waiting logo, push downs all controls !


using below code, I enable the Ajax waiting logo.

                    <asp:UpdateProgress ID="UpdateProgressH" runat="server">
                            <p align="center">
                                <img src="../image/ajax-loader.gif" alt="" /></p>

Additionally, I trigger it using :

                                <asp:AsyncPostBackTrigger ControlID="btnSearchH" EventName="Click" />

But whenever logo appears, it push downs all controls.

How can I show the logo in front of all controls, in order to prevent this issue?

A time-out occurred while waiting for buffer latch -- type 2 Not continuing to wait.



when we are executing query in sql server 2005(SP2) we are getting below error.

A time-out occurred while waiting for buffer latch -- type 2, bp 03BD8650, page 1:15883707, stat 0x1c0040d, database id: 7, allocation unit Id: 72057608604745728, task 0x54FA8118 : 5, waittime 300, flags 0x3a, owning task 0x009291F8. Not continuing to wait.

Physical Memory=8G.

Memory Utilization is also looking normal.

please let me know how to avoid this problem and provide me if any article is available.





venkat reddy

Slow startup. Waiting for MEX data for 40 seconds.


Hi all,

I'm tearing my hear out, and I don't have that much hair left to start with.  I have a WCF program that takes 41 seconds to start. For 40 of those seconds it's sitting waiting for the MEX data.  It runs fine after that.  Here are the details:

  • Running on Windows 7, and I can't try it on another machine.  This is the machine it has to work on.
  • Compiled with Visual Studio 2010 with .NET 4.0 as the target
  • I'm not running in Administrator mode, and it doesn't help anyway, when I tried it. (And I can't imagine why anyone would do that, but that's another story!)
  • The endpoint is using the named pipes protocol, so I can't set "UseDefaultWebProxy = false".
  • I tried other protocols including the HTTP protocols and TCP.  It doesn't change anything.
  • I have no security set at all.
  • I added the <generatePublisherEvidence enabled="false" /> because I understand that can help if the lookup is searching for expired certificates.
  • I tried it with one base address -- for the named pipe; and with the current two base addresses.
  • While it's sitting there for 40 seconds waiting for the MEX data, my internet browser hangs.
  • Also, when looking at the trace I notice that before listening for MEX, it constructs a ServiceHost and the

Waiting on processors eats processor time!


I have an unusual situation going on right now, which is giving me a chance to get some unusual views of the guts of SQL Server.  I'm wondering if what I see is known, is a feature or a bug, or if I shouldn't believe my lying eyes!

What I have is a situation where an app developer is accidentally (harumph) submitting some impossible cartesian joins to the server, and letting them run for an hour before noticing or killing them.  Fun to start with, right?  But here's the thing.  We have four processors and maxdop=0.  These queries generate parallel plans.  So what happens is the first one in grabs all the processors and runs forever.  Sometimes smaller queries leak through, somehow.  I'm not sure how that works!  But here's the thing, there are two more cartesian joins already running also, only ... they aren't really running.  They are consuming CPU time steadily, but doing no logical IOs.  I presume what is going on is that they can't reserve all the processors they need for their plans, and so are "resource starved" blocked, which does NOT show as blocked on things like sp_who2.

So, my question is, if they're just sitting there resource blocked, and the cpu times are running up fast - is that a bug?  Or are they actually maybe doing something useful with all that CPU, that does n

Process waiting state


Hi experts,

I want retrieve process state. It is possible to know if a process is in waiting state ?



Editing an item whose draft item is waiting for approval causes runtime exception



I have a list where content approval is enabled by going to Version Settings page of the list. I have allowed to view the draft items only by the author of the item (who created the item) and the person who can approve. Now if an item's draft item is pending for approval, and if another user (who is neither the author nor the user from approver group) try to edit the item, he/she gets runtime error. The more details are reported on the site http://ranaictiu-technicalblog.blogspot.com/2010/11/sharepoint-2010-editing-item-whose.html


I'm not sure if the error is reported already. Can anybody help?


Sohel Rana

SQL Server is waiting for an internal operation to complete


When saving a database diagram, SQL Server 2005 frequently "hangs" for an indeteminate amount of time and displays the message "Microsoft SQL Server Management Studio is waiting for an internal operation to complete. If you regularly encounter this delay during normal usage, pelase report this problem to Microsoft."

For one thing, this is an extremely lame and unhelpful message, as it gives no clue as to specifically *who* to report the problem to (Microsoft is pretty big, after all), and an "internal operation" is sufficiently ambiguous to mean anything.

I cannot find any references to this problem, and it happens frequently enough that I'm finding it very difficult to use Management Studio for editing diagrams. When this problem occurs, the "hang" sometimes last for several minutes, but frequently last longer than 20 minutes, after which I simply kill the process in Task Manager.

I have also experienced the problem when simply saving table modifications, though less frequently than with diagram edits.

Does anyone know what causes this, or have any resolution for the problem?


How to decrease data waiting time?


I have some difficulties in one of the web based projects that I've developed.

It's a country wide project and database is big, so the waiting time is getting increasing.
I tried to write non- complex queries and set up index on some important fields that are being searched as well.

Is there any other way to enhance the efficiency and performance?

Merge Replicatoin Paused and waiting....


Hi Friends Please find the message i am getting here,,,

Wiating but doing nothing....

Suggest me what shall be done....

2010-12-02 17:30:13.954 The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.
2010-12-02 17:35:13.981 The process is waiting for a response from the query '{call sys.sp_MSget_subscriber_partition_id (?,?,?)}'
2010-12-02 17:35:13.996 The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.

Waiting for service availability


We are using custom activities in our system.

Each custom activity consists of few system ones with at least two code activities. Each code activity is accessing web server method. 

There might be some cases when web server is not accessible and timeout exception occurs. By default workflow is terminated then. I would like activity to wait for server availability for some predetermined time and terminate workflow only if time interval is exceeded.

Are there any ideas?

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