473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

That it! Please I need help

Hi,
I have MSMQ installed on my domain controller (Win 2003) and on my XP client
(developer box). I created a private queue under private queues.

I am able to write messages to the queue like

str = "FormatName:Direct=TCP:xx.xx.xx.xx\PRIVATE$\testqu eue"

Dim msgQ As MessageQueue
Dim txt As String

txt = "From Sec PC"

Try

msgQ = New MessageQueue(str)
msgQ.Send(txt, "PC TESTing")
Catch ex As Exception

MsgBox(ex.Message)

End Try
but I am unable to retrieve message from the queue like this

Dim msgQ As MessageQueue = New MessageQueue(str)
Dim msg As Message

Try
msgQ.SetPermissions("user",
MessageQueueAccessRights.FullControl, AccessControlEntryType.Set)

msgQ.Formatter = New XmlMessageFormatter( _
New Type() {GetType(System.String)})
msg = msgQ.Receive
MessageBox.Show(msg.Body)
Catch ex As Exception

MsgBox(ex.Message)

End Try
I get the error

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted.

Please help. I have been trying for days on this.

Thanks
Jul 21 '05 #1
11 4760
Chris <Ch***@discussions.microsoft.com> wrote:
I have MSMQ installed on my domain controller (Win 2003) and on my XP client
(developer box). I created a private queue under private queues.
<snip>
I get the error

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted.

Please help. I have been trying for days on this.


It would help if you'd say which line threw that exception.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Hi,
I think the error is here

msgQ.Formatter = New XmlMessageFormatter( _
' New Type() {GetType(System.String)})
"Jon Skeet [C# MVP]" wrote:
Chris <Ch***@discussions.microsoft.com> wrote:
I have MSMQ installed on my domain controller (Win 2003) and on my XP client
(developer box). I created a private queue under private queues.


<snip>
I get the error

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted.

Please help. I have been trying for days on this.


It would help if you'd say which line threw that exception.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3
Chris <Ch***@discussions.microsoft.com> wrote:
I think the error is here

msgQ.Formatter = New XmlMessageFormatter( _
' New Type() {GetType(System.String)})


That sounds unlikely, because you're not doing any operations on that
line.

When you say you *think* the error is there - what does the stack trace
say?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
I don't get any stack trace. That's because of

Catch ex As Exception

MsgBox(ex.Message)

End Try

so it shows

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted"

"Jon Skeet [C# MVP]" wrote:
Chris <Ch***@discussions.microsoft.com> wrote:
I think the error is here

msgQ.Formatter = New XmlMessageFormatter( _
' New Type() {GetType(System.String)})


That sounds unlikely, because you're not doing any operations on that
line.

When you say you *think* the error is there - what does the stack trace
say?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #5
Chris <Ch***@discussions.microsoft.com> wrote:
I don't get any stack trace. That's because of

Catch ex As Exception

MsgBox(ex.Message)

End Try

so it shows

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted"


Well that's your code which is stopping you from seeing the stack
trace, isn't it? You should be able to change it so that you *can* see
the stack trace.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #6
I got this

An unhandled exception of type 'System.Messaging.MessageQueueException'
occurred in system.messaging.dll

Additional information: External component has thrown an exception.
"Jon Skeet [C# MVP]" wrote:
Chris <Ch***@discussions.microsoft.com> wrote:
I don't get any stack trace. That's because of

Catch ex As Exception

MsgBox(ex.Message)

End Try

so it shows

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted"


Well that's your code which is stopping you from seeing the stack
trace, isn't it? You should be able to change it so that you *can* see
the stack trace.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #7
Chris <Ch***@discussions.microsoft.com> wrote:
I got this

An unhandled exception of type 'System.Messaging.MessageQueueException'
occurred in system.messaging.dll

Additional information: External component has thrown an exception.


But if you display the stack trace from the exception (rather than just
the message), you'll have a more detailed idea of what's going on.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #8
Sorry about that. Here is the stack
---------------------------
msmqRec
---------------------------
at System.Messaging.MessageQueue.SetPermissions(Acces sControlList dacl)

at System.Messaging.MessageQueue.SetPermissions(Strin g user,
MessageQueueAccessRights rights, AccessControlEntryType entryType)

at msmqRec.Form1.Button1_Click(Object sender, EventArgs e) in
c:\Projects\Programs\VisualBaic.Net\MSMQ\msmqRec\m smqRec\Form1.vb:line 117
---------------------------
OK
---------------------------
"Jon Skeet [C# MVP]" wrote:
Chris <Ch***@discussions.microsoft.com> wrote:
I got this

An unhandled exception of type 'System.Messaging.MessageQueueException'
occurred in system.messaging.dll

Additional information: External component has thrown an exception.


But if you display the stack trace from the exception (rather than just
the message), you'll have a more detailed idea of what's going on.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #9
Chris <Ch***@discussions.microsoft.com> wrote:
Sorry about that. Here is the stack
---------------------------
msmqRec
---------------------------
at System.Messaging.MessageQueue.SetPermissions(Acces sControlList dacl)

at System.Messaging.MessageQueue.SetPermissions(Strin g user,
MessageQueueAccessRights rights, AccessControlEntryType entryType)

at msmqRec.Form1.Button1_Click(Object sender, EventArgs e) in
c:\Projects\Programs\VisualBaic.Net\MSMQ\msmqRec\m smqRec\Form1.vb:line 117
---------------------------
OK
---------------------------


Right, that tells a far clearer story.

Now, if you have a look at the docs for MessageQueue.SetPermissions,
you'll see that you can't set the permissions on a queue on a remote
computer.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #10
Ok I see. Excluding the permission, how can I access the private on the
remote server from one pc but not on the other. The only difference is the
the pc that can access the private queue is on the domain but the other is
not which brings me to another queston:
Is it possible to access a remote private queue for a pc not on the domain?

"Chris" wrote:
I don't get any stack trace. That's because of

Catch ex As Exception

MsgBox(ex.Message)

End Try

so it shows

"The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted"

"Jon Skeet [C# MVP]" wrote:
Chris <Ch***@discussions.microsoft.com> wrote:
I think the error is here

msgQ.Formatter = New XmlMessageFormatter( _
' New Type() {GetType(System.String)})


That sounds unlikely, because you're not doing any operations on that
line.

When you say you *think* the error is there - what does the stack trace
say?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #11
Chris <Ch***@discussions.microsoft.com> wrote:
Ok I see. Excluding the permission, how can I access the private on the
remote server from one pc but not on the other. The only difference is the
the pc that can access the private queue is on the domain but the other is
not which brings me to another queston:
Is it possible to access a remote private queue for a pc not on the domain?


That I don't know, I'm afraid - I'm not a message queue expert, I'm
afraid. I suggest you ask on an MSMQ newsgroup - it sounds like an MSMQ
issue rather than a .NET one as such.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Krakatioison | last post by:
Hi all, I need a help to write a simple preg_match. Imagine, I've got like 5kb of text where one part of the text always starts with: and ends with: Number after "[quote:" is always...
7
by: Stephen | last post by:
I have some code which I call from a custom validator however I seem to have got the logic wrong and im having trouble figuring out how to write my code to get things to work the way I require....
1
by: Chua Wen Ching | last post by:
Hi there, I have some problems when reading XML file. 1. First this, is what i did, cause i can't seem to read "sub elements or tags" values, so i place those values into attributes like this....
2
by: tuan_vandyk | last post by:
Hi I desperately need help with my project. Theoretically everything should work bu it just isn't. Please email me for a copy of the project's source code. It was made in Turbo C++ 5. Please if...
0
by: Miguel Dias Moura | last post by:
Hello, I am working on an Asp.Net 2.0 / SQL 2005 web site. I am using profile to save the users info on the database. For example, I have the following structure: Public Structure Name...
17
by: cpptutor2000 | last post by:
Could some C guru please help me? I have a simple piece of code as: #include <stdio.h> #include <stdlib.h> #include <openssl/rand.h> int main(){ unsigned char temp; RAND_bytes(temp, 4);
0
by: tgregg6 | last post by:
I need help with my problem I am stuck and I don't know what to do!!! The problem is: This program calculates the charges for DVD rentals where current releases cost $3.5 and all others cast $2.50....
22
by: settyv | last post by:
Hi, I need to write a Javascript which calculates datedifference as well as date comparision.When i try to embed the below script,it is working well,but the page is submitting even when the...
3
by: roberthornsby | last post by:
Hi, Please can you help me with this query which I am struggling with? Here is a simplified version of the table I am trying to work with VehicleId, PurchaseId, PurchaseDate, Comment 1, 1, ...
1
by: Mero | last post by:
hi to all; i'm using asp.net 1.1, c#.net.visual studio 2003 to make my asp web application in my application, i want when i add a new topic a link or icon about this topic appear in another page ....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.