Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with sending or receiving Messages

43 views
Skip to first unread message

Suds

unread,
Sep 24, 2008, 6:27:01 PM9/24/08
to
Hi

I am trying to send a encrypted message from publicqueueA to a publicqueueB
in the same Server using the privacy level as "Body" in queue properties for
both public queues. For some reason its not sending/receiving messages.

Am I missing anything. All I am trying to acheive is to encrypt the message
body for security.

It this works I want to test the same from public queues in different servers.

Thanks,

Frank Boyne

unread,
Sep 24, 2008, 7:13:25 PM9/24/08
to
"Suds" <Su...@discussions.microsoft.com> wrote in message
news:301809B8-C4C5-47C4...@microsoft.com...

> I am trying to send a encrypted message from publicqueueA to a
> publicqueueB
> in the same Server using the privacy level as "Body" in queue
> properties for
> both public queues. For some reason its not sending/receiving
> messages.

Could you explain in more detail what you are doing, and perhaps show
some snippets of code?

MSMQ doesn't really have the concept of sending message from one queue
to another. Programs send messages by calling the function
MQSendMessage() or by calling some equivalent function like
MSMQMessage.Send() or System.Messaging.MessageQueue.Send().

In all three cases, the only queue involved is the destination queue
(what you are calling publicqueueB). If the destination queue is on a
remote system, the message will be stored temporarily in a local quue
known as an "Outgoing Queue" but outgoing queues are an internal MSMQ
mechanism only used for moving messages between two systems.

By the way, you should be careful about using a privacy level of "Body"
as MQMSG_PRIV_LEVEL_BODY is "Not supported for applications compiled
with the header and library files for MSMQ 3.0"...
http://msdn.microsoft.com/en-us/library/ms707069(VS.85).aspx

Assuming you have a new enough copy of the SDK, you should use
MQMSG_PRIV_LEVEL_BODY_BASE or MQMSG_PRIV_LEVEL_BODY_ENHANCED


Suds

unread,
Sep 24, 2008, 7:38:04 PM9/24/08
to
Oops I am sorry, I meant to send messages to a public queue from C#
application.
After setting the message.useencryption = true, I am able to send message to
a public queue with encryption.

Please let me know for the following:

1) "MQMSG_PRIV_LEVEL_BODY is "Not supported for applications compiled
with the header and library files for MSMQ 3.0"..." I am using application
developed in C#, .net 2.0 in Win2003 server. Is this ok or I should worry
about it?
2) MSMQ SDK: Could you please send me the link to download MSMQ SDK?
3) I see RC2 encryption as 64 bit, how can I get 128 bit encryption?

Frank Boyne

unread,
Sep 25, 2008, 2:43:14 PM9/25/08
to
"Suds" <Su...@discussions.microsoft.com> wrote in message
news:A5071689-8ED9-4B67...@microsoft.com...

> 1) "MQMSG_PRIV_LEVEL_BODY is "Not supported for applications compiled
> with the header and library files for MSMQ 3.0"..." I am using
> application
> developed in C#, .net 2.0 in Win2003 server. Is this ok or I should
> worry
> about it?

You don't need to worry about this. You aren't using
MQMSG_PRIV_LEVEL_BODY directly, the System.messaging namespace takes
care of things for you when you set UseEncryption to true.

> 2) MSMQ SDK: Could you please send me the link to download MSMQ SDK?

Since you are using the System.Messaging namespace, you don't need the
Platform SDK. System.Messaging.dll was compiled with some version of
the PSDK (or something equivalent) but you don't control that. Still,
since I brought up the whole topic here's a link to the current SDK

Windows SDK for Windows Server 2008 and .NET Framework 3.5
http://www.microsoft.com/downloads/details.aspx?FamilyID=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en

> 3) I see RC2 encryption as 64 bit, how can I get 128 bit encryption?

I don't think you can control which level of encryption through the
System.Messaging namespace (unfortunately the namespace is not a
complete implementation of the current MSMQ API).

You can control which encryption algorithm is used via the
EncryptionAlgorithm property but that only lets you choose between Rc2
and Rc4 it doesn't let you control the encryption size.

By the way, I think MSMQ uses 40 bit (MQMSG_PRIV_LEVEL_BODY_BASE) and
128 bit (MQMSG_PRIV_LEVEL_BODY_ENHANCED) encryption so I would't expect
you to be seeing 64-bit encryption. But I haven't looked at encryption
lately so I may be missing something.


0 new messages