PC Review


Reply
Thread Tools Rate Thread

MSMQ - Send Message Issue from device to PC

 
 
shikha meena
Guest
Posts: n/a
 
      23rd Feb 2007
Hi,

I have written the following code to send message using MSMQ from the
device to PC.

Private Sub SendMessageToQueue(ByVal Path As String)
' Create a new order and set values.
myQ = New MessageQueue(Path)
Dim sendOrder As New MSG
ID += 1
Label4.Text = ID
sendOrder.orderID = Label4.Text

Label5.Text = DateTime.Now
sendOrder.orderTime = Label5.Text

sendOrder.orderBody = TextBox1.Text

Try
myQ.Send(sendOrder)
myQ.Close()
MsgBox("Message Sent")
Catch ex As Exception
MsgBox("SendMessage: " & ex.Message)
End Try
End Sub


On the line "myQ.Send(sendOrder)" following exception is thrown
"The queue does not exist
or you do not have sufficient permissions to perform the operation"

at MQCacheableInfo.get_WriteHandle()
at System.Messaging.MessageQueue.StaleSafeSendMessage()
at System.Messaging.MessageQueue.SendInternal()
at System.Messaging.MessageQueue.Send()
at MSMQcf.Form1.SendMessageToQueue()
at MSMQcf.Form1.Button3_Click()


Any suggestion to resolve this problem will be a great help.

Thanks
Shikha

 
Reply With Quote
 
 
 
 
joker
Guest
Posts: n/a
 
      23rd Feb 2007
Have you installed (the cab), then registered and started MSMQ on the
device?

Also, you'll need to create the queue.

MessageQueue.Create(QUEUE_NAME); //I'm not sure of the VB equivalent.

If MSMQ is installed, check the log file, normally in \temp\msmq, on
the device for any errors occurring there.

Good luck and let us know what the issue was.

 
Reply With Quote
 
 
 
 
shikha meena
Guest
Posts: n/a
 
      23rd Feb 2007
On Feb 23, 12:12 pm, "joker" <(E-Mail Removed)> wrote:
> Have you installed (the cab), then registered and started MSMQ on the
> device?
>
> Also, you'll need to create the queue.
>
> MessageQueue.Create(QUEUE_NAME); //I'm not sure of the VB equivalent.
>
> If MSMQ is installed, check the log file, normally in \temp\msmq, on
> the device for any errors occurring there.
>
> Good luck and let us know what the issue was.


Hi ,
I have installed (the cab), then registered and started MSMQ on the
device.

I tried creating a queue ..but in case of remote messaging i guess a
queue cannot be created.. therefore i am getting a error when i try
creating a queue

Can u suggest anything ...

Thanks for the help...

Shikha


 
Reply With Quote
 
joker
Guest
Posts: n/a
 
      23rd Feb 2007
Any hints in the log file? Also, the queue must be created on the
Desktop machine, although I don't believe this would prevent you from
sending the message, just prevent the message from being delivered.

What is the device you are sending from? PPC, Windows Mobile? or CE?

I know when I was using the emulator, I had to do a soft reset after
installing msmq in order for it to start. Can you verify that MSMQ is
indeed running? (use the msmqadm.exe tool or visadm.exe gui tool)

 
Reply With Quote
 
shikha meena
Guest
Posts: n/a
 
      23rd Feb 2007
Hi,
I am working on the Pocket PC ... I had a look at the log file
msmqadmio.txt - which had following txt -

Windows CE 5.01 (Build 422, 3) - MSMQ 4.2002 (Build 0), MSMQ_CE
DISCONNECTED

I also tried visadm.exe gui tool on the PPC .. Through the shortcuts
in the visadm.exe i clicked on the start and then looked at the status
which is showing the same line

Windows CE 5.01 (Build 422, 3) - MSMQ 4.2002 (Build 0), MSMQ_CE
DISCONNECTED

Could you please guide how can i resolve this....

Thanks...

Shikha



 
Reply With Quote
 
joker
Guest
Posts: n/a
 
      23rd Feb 2007
Not sure, but it doesn't sound like mq is running. I use the
msmqadm.exe command line tool, but you can use visadm tool to do the
same thing. The following is what I type to get mq running.

msmqadm register cleanup
msmqadm register install
msmqadm register
msmqadm start

I'm not sure why, but I always get an error on the 3rd line, but if I
don't do it, mq doesn't start.

Also, make sure that you have a hostname defined. I think the device
name or device id will work, otherwise change the HostName registry
entry (the msmq value) to set it.

 
Reply With Quote
 
shikha meena
Guest
Posts: n/a
 
      24th Feb 2007
Hi ,

II have found the log file msmq - MQLOGFILE.TXT and in that following
text is written:

[11:55:21 2/24/2007] MSMQ service started.

So it is confirmed that the MSMQ is running ... The device name on the
PPC is set .. Do u think it is still required to change the Hostname
registry entry. If yes then where can i set it and what value should i
set it to.


Thanks,
Shikha

 
Reply With Quote
 
joker
Guest
Posts: n/a
 
      24th Feb 2007
What status do you get when you run the visadm status command?


 
Reply With Quote
 
shikha meena
Guest
Posts: n/a
 
      24th Feb 2007
Status remains the same in visadm

Windows CE 5.01 (Build 422, 3) - MSMQ 4.2002 (Build 0), MSMQ_CE
DISCONNECTED



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Q: Accessing MSMQ on WinXP Pro from a docked WM5 device Adam Bradley Microsoft Dot NET Compact Framework 12 19th Apr 2012 08:00 AM
MSMQ binding Stop processing after Cluster MSMQ failover Bhavesh Shah Microsoft C# .NET 0 24th Apr 2009 05:02 PM
Send MSMQ message using C# without serialization? Tbone Microsoft C# .NET 1 31st Jan 2008 08:33 PM
How to send a Global Variable message to MSMQ for SQL-DTS to read? =?Utf-8?B?SnVzdCBKb2U=?= Microsoft VB .NET 0 24th May 2005 07:45 PM
Queued Component issue whith MSMQ installed in workgroup mode Girish G Microsoft C# .NET 5 18th Sep 2004 03:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:55 AM.