Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

System.OutOfMemoryException was thrown by System.messaging assembly.

$
0
0

Hi,

In our c# application we are trying to find the Message count and thats throwing the System.OutOfMemoryException. Can someone please help me resolve this error? I'm positive that the system has enough memory available.

int count = 0;

Open();

count=asyncReadQueue.GetAllMessages().Length();

The call stack looks like this:

055 9:19:43 AM [6068] ERROR: ----------------------------------------------  
00000056 9:19:52 AM [6068] ERROR: -----------------Excpetion -------------------  
00000057 9:19:52 AM [6068] ERROR: Exception of type 'System.OutOfMemoryException' was thrown.  
00000058 9:19:52 AM [6068] ERROR: TargetSite = .ctor  
00000059 9:19:52 AM [6068] ERROR:    at System.Messaging.Interop.MessagePropertyVariants..ctor()  
00000060 9:19:52 AM [6068]    at System.Messaging.Message..ctor(MessagePropertyFilter filter)  
00000061 9:19:52 AM [6068]    at System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan timeout, Int32 action, CursorHandle cursor, MessagePropertyFilter filter, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)  
00000062 9:19:52 AM [6068]    at System.Messaging.MessageEnumerator.get_Current()  
00000063 9:19:52 AM [6068]    at System.Messaging.MessageQueue.GetAllMessages()  
00000064 9:19:52 AM [6068]    at Acc.Messaging.AccMsmqNet.get_MessageCount()


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>