You receive an error message when you perform asynchronous receive operations on a Message Queuing dependent client (816497)
The information in this article applies to:
- Microsoft .NET Framework 1.0
- Microsoft .NET Framework 1.0 SP1
- Microsoft .NET Framework 1.0 SP2
- Microsoft .NET Framework 1.0 SP3
- Microsoft .NET Framework 1.1
- Microsoft Message Queue Server (MSMQ) 1.0
SYMPTOMSYou may receive the following error message when you perform asynchronous receive operations on a Microsoft Message Queuing (also known as MSMQ) dependent client: An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object.
CAUSEThis problem occurs because the IAsyncResult object that is returned by the MessageQueue.BeginReceive method is garbage collected before the callback fires. RESOLUTIONTo resolve this problem, references to the IAsyncResult object for each invocation of the BeginReceive method must be kept alive until the callback is complete. If the references are not kept alive, they cannot be garbage collected.
Modification Type: | Major | Last Reviewed: | 4/20/2005 |
---|
Keywords: | kbprb KB816497 kbAudDeveloper |
---|
|