473,511 Members | 16,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem reading messages async after doing an enum at app-start [.Net 1.1]

Hi All,

I have a problem reading queue-messages async. My QueueReader has a Start()
and a Stop() method and if my app starts, it calls Start(). The problem is,
that there are possibly several hundreds of messages in the queue, which I
do not want to have processed by the async messagehandler at startup. So in
Start(), I create a new thread, which's method [called PreRead] just simply
enums the queue-messages [and processes them including remove]. At the end
of this thread, I fire an event. The eventhandler in turn executes a
"queue.BeginReceive()" and assigns the messagehandler to initiate async
processing. The messagehandler is then immidiately called, but hungs
forever. It hangs at

private void OnReceiveCompleted(Object source, ReceiveCompletedEventArgs
asyncResult)
{
MessageQueue q = (MessageQueue) source;
Message m = q.EndReceive(asyncResult.AsyncResult); //<< hungs.

The astoundig think is first, that the message-receiver is immidiately
called. My PreRead method uses a local queue object and all resources are
releases properly. I tried also to skip all that queue-processing in PreRead
and only fire the event finally. Event this leads to the same behavior.
So it looks like, if I start async reading from a different thread, it is
not working.

I use Windows 2000, en, SP4, all fixes, .Net 1.1, SP1

Any helpf would be great!

Best regards,
Manfred Braun

(Private)
Lange Roetterstrasse 7
D68167 Mannheim
Germany

mailto:manfred.braun-at-manfbraun.de
(Remove the anti-spam-"-at-" to mail me!)
Nov 26 '05 #1
0 1240

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1965
by: Jonas | last post by:
Hi, I'm writing a small chat client to learn some python and networking. No problem with the network stuff tho, the problem is when the user should be able to interact and type messages to send....
10
9057
by: dof | last post by:
I'm trying the following and having problems. I get errors on the array declaration lines. Something about an array must have at least one element. Thanks in advance. D #include stuff .... ...
1
2769
by: Thomas Lerchner | last post by:
Hi! I have a problem with an UDP socket. I create socket and call BeginReceiveFrom to use the socket async. But the callback methode is being called several times with the same packet from the...
3
5289
by: Mike | last post by:
I have created a web service for a client to consume. The element I am having trouble with is, as described in their WSDL: <xsd:element minOccurs="0" ref="LocalData" maxOccurs="1" /> ...
1
2446
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
2
2108
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
1
4433
by: Demi | last post by:
I'm trying to use an Async="true" page to do an async HttpWebRequest. My code is based on the MSDN example: http://msdn2.microsoft.com/en-us/library/21k58ta7.aspx The problem I'm having is...
0
2190
by: Slawomir Nasiadka | last post by:
Hi, I'am new to this group so I would like to say "Hello" everyone and here is my problem: I'm writing a simple application (code is at the end of this message) witch would list all mails...
2
1484
by: David | last post by:
We've developed a seismic-data processing app in VB.NET 1.1 which runs on XP Pro using SQL2K. Like all seismic data apps, it deals with HUGE amounts of binary data (we use NTFS sparse "flat...
10
4479
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.