Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Sat, 4 Feb 2006 23:58:39 -0800,    group: microsoft.public.dotnet.datatools        back       


cannot post to MSMQ from dotnet code   
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();

                    }
    }
}
date: Sat, 4 Feb 2006 23:58:39 -0800   author:   Jack

Re: cannot post to MSMQ from dotnet code   
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
date: Sun, 5 Feb 2006 15:33:51 +0000 (UTC)   author:   Michael Nemtsev

Re: cannot post to MSMQ from dotnet code   
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
> 
> 
>
date: Sun, 5 Feb 2006 09:52:27 -0800   author:   Jack

Re: cannot post to MSMQ from dotnet code   
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
date: Mon, 6 Feb 2006 18:02:42 +0000 (UTC)   author:   Michael Nemtsev

Re: cannot post to MSMQ from dotnet code   
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
date: Mon, 6 Feb 2006 19:21:17 +0000 (UTC)   author:   Michael Nemtsev

Re: cannot post to MSMQ from dotnet code   
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
> 
> 
>
date: Mon, 6 Feb 2006 13:27:11 -0800   author:   Jack

Re: cannot post to MSMQ from dotnet code   
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
date: Tue, 7 Feb 2006 05:57:40 +0000 (UTC)   author:   Michael Nemtsev

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us