Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. msmq stackoverflow exception

msmq stackoverflow exception

Scheduled Pinned Locked Moved C#
csharphelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    poqeqw
    wrote on last edited by
    #1

    I am writeing windows service that makes use of MSMQ in .net 2003 in c#. I use the method beginPeek(TimeSpan) and wating for an message to arrive the event handler look like this: private void MyPeekCompleted(Object source, PeekCompletedEventArgs asyncResult) { try { // End the asynchronous peek operation. Message m = _mq.EndPeek(asyncResult.AsyncResult); //logic to handel message mq.BeginPeek(new TimeSpan(0,1,0)); } catch(MessageQueueException e) { if (e.MessageQueueErrorCode == MessageQueueErrorCode.IOTimeout) { Console.WriteLine(e.ToString()); } _mq.BeginPeek(new TimeSpan(0,1,0)); } catch(Exception ex) { // some code to handel error } after a while i get stackoverflow exception. event though no messages arrives... It works fike for a couple of minuts and than crushes.. How can i solve this.. Sample code will be greate help.. im using winXP Thnks

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups