I am not able to post a simple message locally to my local MSMQ through this code although I can post to the same queue using some demo code. My code is using System; using System.Collections.Generic; using System.Xml; using System.IO; using System.Text; using System.Reflection; using System.Messaging; namespace WindowsApplication1 { static class test { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { string oobject; Message mymessage = new Message(); MessageQueue myMSMQueue = new MessageQueue(); MessageQueueTransaction myquetrans = new MessageQueueTransaction(); ActiveXMessageFormatter xmlmessageformat = new ActiveXMessageFormatter(); myMSMQueue.Path = (@".\private$\incoming"); oobject = "message sent"; mymessage.Label = "testx"; mymessage.Body = oobject; try { myMSMQueue.Send(oobject); } catch (MessageQueueException ex) { Console.WriteLine("message " + ex.Message); Console.WriteLine("message " + ex.Source); Console.WriteLine("message " + ex.InnerException.Message); } myMSMQueue.Close(); } } }
Hello Jack, Did you manually create this private group with name "incoming" in Message Queuing Admin? J> I am not able to post a simple message locally to my local MSMQ J> through this code although I can post to the same queue using some J> demo code. J> J> My code is J> myMSMQueue.Path = (@".\private$\incoming"); --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche
No, it is created by an application that I installed. I created a manual queue and the code works with the manual queue but does not work with this one. What do I look at in the queue to resolve this one? "Michael Nemtsev" wrote: > Hello Jack, > > Did you manually create this private group with name "incoming" in Message > Queuing Admin? > > J> I am not able to post a simple message locally to my local MSMQ > J> through this code although I can post to the same queue using some > J> demo code. > J> > J> My code is > J> myMSMQueue.Path = (@".\private$\incoming"); > > --- > WBR, > Michael Nemtsev :: blog: http://spaces.msn.com/laflour > > "At times one remains faithful to a cause only because its opponents do not > cease to be insipid." (c) Friedrich Nietzsche > > >
Hello Jack, I mean, did that created queue exist in MSMQ Admin MMC Console? Can you open it? J> No, it is created by an application that I installed. J> J> I created a manual queue and the code works with the manual queue but J> does not work with this one. What do I look at in the queue to J> resolve this one? J> J> "Michael Nemtsev" wrote: J> >> Hello Jack, >> >> Did you manually create this private group with name "incoming" in >> Message Queuing Admin? >> >> J> I am not able to post a simple message locally to my local MSMQ >> J> through this code although I can post to the same queue using some >> J> demo code. >> J> >> J> My code is >> J> myMSMQueue.Path = (@".\private$\incoming"); >> --- >> WBR, >> Michael Nemtsev :: blog: http://spaces.msn.com/laflour >> "At times one remains faithful to a cause only because its opponents >> do not cease to be insipid." (c) Friedrich Nietzsche >> --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche
Hello Jack, Seems I know what's the problem In your code you use myMSMQueue.Path = (@".\private$\incoming"); - it *initialize* already created queue, but I can't find where u create queue use MessageQueue myMSMQueue = MessageQueue.Create(@".\private$\incoming"); and then send data J> No, it is created by an application that I installed. J> I created a manual queue and the code works with the manual queue but J> does not work with this one. What do I look at in the queue to J> resolve this one? >> Did you manually create this private group with name "incoming" in >> Message Queuing Admin? >> >> J> I am not able to post a simple message locally to my local MSMQ >> J> through this code although I can post to the same queue using some >> J> demo code. >> J> >> J> My code is >> J> myMSMQueue.Path = (@".\private$\incoming"); --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche
I fixed the issue. Thank you for your help. I am trying to receive this xml file from my customer. How do I set up the receiver to receive this file over the web? Any code example will be appreciated. "Michael Nemtsev" wrote: > Hello Jack, > > I mean, did that created queue exist in MSMQ Admin MMC Console? Can you open > it? > > J> No, it is created by an application that I installed. > J> > J> I created a manual queue and the code works with the manual queue but > J> does not work with this one. What do I look at in the queue to > J> resolve this one? > J> > J> "Michael Nemtsev" wrote: > J> > >> Hello Jack, > >> > >> Did you manually create this private group with name "incoming" in > >> Message Queuing Admin? > >> > >> J> I am not able to post a simple message locally to my local MSMQ > >> J> through this code although I can post to the same queue using some > >> J> demo code. > >> J> > >> J> My code is > >> J> myMSMQueue.Path = (@".\private$\incoming"); > >> --- > >> WBR, > >> Michael Nemtsev :: blog: http://spaces.msn.com/laflour > >> "At times one remains faithful to a cause only because its opponents > >> do not cease to be insipid." (c) Friedrich Nietzsche > >> > --- > WBR, > Michael Nemtsev :: blog: http://spaces.msn.com/laflour > > "At times one remains faithful to a cause only because its opponents do not > cease to be insipid." (c) Friedrich Nietzsche > > >
Hello Jack, Do you wanna put message into your local intranet MQ from the web or do you want interact in the web with asycn messages? For the first you can use WebServices as the endpoint - you send message to webService and it put your message in local intranet MQ The second now in not possible in the pure aspect of MQ. Indigo (WCF) will realise these features, but now we can be only a bit close to this using WS-ReliableMessaging - it gives u feature of message persistene, but don't affect wire protocol Moreover there is one alternative realization MQ for Web - WSMQ (http://www.wsmq.com/) but I haven't use it yet and don't know its features J> I fixed the issue. Thank you for your help. J> J> I am trying to receive this xml file from my customer. How do I set J> up the receiver to receive this file over the web? Any code example J> will be appreciated. >> I mean, did that created queue exist in MSMQ Admin MMC Console? Can >> you open it? >> >> J> No, it is created by an application that I installed. >> J> >> J> I created a manual queue and the code works with the manual queue >> but >> J> does not work with this one. What do I look at in the queue to >> J> resolve this one? >> J> >> J> "Michael Nemtsev" wrote: >> J> >>>> Hello Jack, >>>> >>>> Did you manually create this private group with name "incoming" in >>>> Message Queuing Admin? >>>> >>>> J> I am not able to post a simple message locally to my local MSMQ >>>> J> through this code although I can post to the same queue using >>>> some >>>> J> demo code. >>>> J> >>>> J> My code is >>>> J> myMSMQueue.Path = (@".\private$\incoming"); --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche