473,568 Members | 3,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSMQ Send Problem in ASP.NET

I have a server application that monitors a private local queue for
messages. The message sent to it has a label and a response queue defined.
It works correctly when the queue is accessed via another program.

However, when I attempt to Send a message from an ASP.NET VB page, I get
"One or more of the passed properties are invalid." I have tried different
combinations of the non-transactional Send() with no success. My
Windows\Temp directory has open access (did this based on another posted
response which took care of the xml formatter loading a temporary dll) but I
cannot get past this message.

If this is a security issue, I need to know how to allow this page send
access as this page must be available to all (no login). It appears that
the queue currently has send access for anonymous login according to the
MSMQ console.

I am posting this on two groups as I do not know which area this really
falls into.

Thanks in advance.

Pete Loveall
AME Corp.
Jul 21 '05 #1
5 7984
Hi Pete,
Can you post the piece of code that fails on ASP.NET? It may be a security
problem with the queue, with Active Directory (depending how you set the
target / response queue) or an unrelated problem. the code would help
here...

All the best,
Yoel Arnon
www.msmq.biz

"Pete Loveall" <ps*@ametx.com. NO_SPAM> wrote in message
news:uN******** *****@TK2MSFTNG P14.phx.gbl...
I have a server application that monitors a private local queue for
messages. The message sent to it has a label and a response queue defined.
It works correctly when the queue is accessed via another program.

However, when I attempt to Send a message from an ASP.NET VB page, I get
"One or more of the passed properties are invalid." I have tried
different combinations of the non-transactional Send() with no success.
My Windows\Temp directory has open access (did this based on another
posted response which took care of the xml formatter loading a temporary
dll) but I cannot get past this message.

If this is a security issue, I need to know how to allow this page send
access as this page must be available to all (no login). It appears that
the queue currently has send access for anonymous login according to the
MSMQ console.

I am posting this on two groups as I do not know which area this really
falls into.

Thanks in advance.

Pete Loveall
AME Corp.

Jul 21 '05 #2
The basic code is:

Dim mq As MessageQueue = New MessageQueue(". \Private$\myQue ue")
mq.DefaultPrope rtiesToSend.Has hAlgorithm = HashAlgorithm.N one
mq.DefaultPrope rtiesToSend.Enc ryptionAlgorith m = EncryptionAlgor ithm.None
If Not MessageQueue.Ex ists(".\Private $\" & Session.Session ID) Then
MessageQueue.Cr eate(".\Private $\" & Session.Session ID)
Dim respq As MessageQueue = New MessageQueue(". \Private$\" &
Session.Session ID)
respq.MessageRe adPropertyFilte r.Administratio nQueue = False
respq.MessageRe adPropertyFilte r.ArrivedTime = False
respq.MessageRe adPropertyFilte r.Body = False
respq.MessageRe adPropertyFilte r.CorrelationId = False
respq.MessageRe adPropertyFilte r.Id = False
respq.MessageRe adPropertyFilte r.Label = True
respq.MessageRe adPropertyFilte r.ResponseQueue = False
respq.MessageRe adPropertyFilte r.SentTime = False
mq.DefaultPrope rtiesToSend.Res ponseQueue = respq
mq.Send(Nothing , "Label Text")
Dim msg As Message = respq.Receive()

I am using only the message label to exchange information. I have also
tried mq.Send("Msg Text") to try using the message body but I get the same
error. It is the Send that is failing. This is the full error message and
stack trace:

Exception Details: System.Messagin g.MessageQueueE xception: One or more of
the passed properties are invalid.

[MessageQueueExc eption (0x80004005): One or more of the passed properties
are invalid.]
System.Messagin g.MessageQueue. SendInternal(Ob ject obj,
MessageQueueTra nsaction internalTransac tion, MessageQueueTra nsactionType
transactionType ) +415
System.Messagin g.MessageQueue. Send(Object obj, String label,
MessageQueueTra nsaction transaction, MessageQueueTra nsactionType
transactionType ) +164
System.Messagin g.MessageQueue. Send(Object obj, String label) +13
myWeb.testpage. Page_Load(Objec t sender, EventArgs e) in C:\Hidden for
security reasons\testpag e.aspx.vb:77
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +750

"Everyone" does have send capabilities on that queue.

Pete Loveall

"Yoel Arnon" <yo**@msmq.bi z> wrote in message
news:%2******** *******@TK2MSFT NGP14.phx.gbl.. .
Hi Pete,
Can you post the piece of code that fails on ASP.NET? It may be a security
problem with the queue, with Active Directory (depending how you set the
target / response queue) or an unrelated problem. the code would help
here...

All the best,
Yoel Arnon
www.msmq.biz

"Pete Loveall" <ps*@ametx.com. NO_SPAM> wrote in message
news:uN******** *****@TK2MSFTNG P14.phx.gbl...
I have a server application that monitors a private local queue for
messages. The message sent to it has a label and a response queue
defined. It works correctly when the queue is accessed via another
program.

However, when I attempt to Send a message from an ASP.NET VB page, I get
"One or more of the passed properties are invalid." I have tried
different combinations of the non-transactional Send() with no success.
My Windows\Temp directory has open access (did this based on another
posted response which took care of the xml formatter loading a temporary
dll) but I cannot get past this message.

If this is a security issue, I need to know how to allow this page send
access as this page must be available to all (no login). It appears that
the queue currently has send access for anonymous login according to the
MSMQ console.

I am posting this on two groups as I do not know which area this really
falls into.

Thanks in advance.

Pete Loveall
AME Corp.


Jul 21 '05 #3
It appears that either
mq.DefaultPrope rtiesToSend.Has hAlgorithm = HashAlgorithm.N one
or
mq.DefaultPrope rtiesToSend.Enc ryptionAlgorith m = EncryptionAlgor ithm.None
are not allowed in ASP.NET. Commenting these two lines out allowed the
application to work.

Thanks for the help.

Pete Loveall
Jul 21 '05 #4
Hi Pete,
Actually the problem was mq.DefaultPrope rtiesToSend.Enc ryptionAlgorith m =
EncryptionAlgor ithm.None . EncryptionAlgor ithm can only be set to RC2 or RC4
(I guess the MSDN documentation -
http://msdn.microsoft.com/library/en...asp?frame=true
- is misleading on this point).

In order to tell MSMQ to send plain (unencrypted) messages, one shoud set
UseEncryption to false (or simply leave it as is - this is the default).
EncryptionAlgor ithm just sets the algorithm used IF UseEncryption is true.

Are you sure th code worked outside of ASP.NET?

All the best,
Yoel Arnon
www.msmq.biz
"Pete Loveall" <ps*@ametx.co m> wrote in message
news:10******** *****@corp.supe rnews.com...
It appears that either
mq.DefaultPrope rtiesToSend.Has hAlgorithm = HashAlgorithm.N one
or
mq.DefaultPrope rtiesToSend.Enc ryptionAlgorith m = EncryptionAlgor ithm.None
are not allowed in ASP.NET. Commenting these two lines out allowed the
application to work.

Thanks for the help.

Pete Loveall

Jul 21 '05 #5
Yes, it definitely worked outside of ASP.NET. Must be some extra checking
in the ASP.NET code.

Thanks.

Pete Loveall

"Yoel Arnon" <yo**@msmq.bi z> wrote in message
news:Om******** ******@TK2MSFTN GP12.phx.gbl...

Are you sure th code worked outside of ASP.NET?

Jul 21 '05 #6

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

Similar topics

0
3682
by: Andrew Gordon | last post by:
I'm investigating getting Microsoft Navision to do stuff from a Python script. The recommended way seems to be to use message queues (MSMQ). I can get Navision to send a message to itself fine. I found a couple of code example in an ancient message in this newsgroup. The send.py one I changed to the following: from win32com.client import...
6
2666
by: Ed A | last post by:
Hi all: I'm try to create a private message queue to communicate between my service and any client that wants to display the data. Everything seems ok until I try to send a message to the queue where the Send call blocks forever!! Please help... here is my code: m_queuePath = @".\Private$\myQueue"; // Start the Message queue
4
5747
by: SRLoka | last post by:
I have an application that has five threads. All five threads write to the same MSMQ. All five threads are using the same global instance to send data to the MSMQ server(on same machine). Occasionally, I get the erroror below. The data(string) being sent is not null or empty. Is this a problem related to multiple threads ? Right now I have...
1
3649
by: Richard Atkinson | last post by:
I would appreciate help on the Microsoft Message Queue. Basically I would like to Serialize an entire class into a message queue and then reinstantiate the class in another application from the message queue with all properties, variables etc in tact. What is the best way to do this ie which formatter to use and how do you deal with...
5
322
by: Pete Loveall | last post by:
I have a server application that monitors a private local queue for messages. The message sent to it has a label and a response queue defined. It works correctly when the queue is accessed via another program. However, when I attempt to Send a message from an ASP.NET VB page, I get "One or more of the passed properties are invalid." I have...
3
3697
by: Claudia | last post by:
Hi all... I'm working on a project that uses MSMQ as its core for inter-process communication. At the moment there is a single process that listens for inbound TCP-based messages on a socket, and when something is received it gets packaged up and sent to an MSMQ queue for further processing. The process on the listening end of this queue...
0
1393
by: yonirabin | last post by:
Hello, I am building a system in C# 2.0 using the master - worker design pattern The system is supposed to work as follows: 1. The Master sends Command objects to the workers 2. All Commands are derived from AbstractCommand class since the system is distributed and should be presistant, I want to use MSMQ to pass the Command object to the...
3
6373
by: yonirabin | last post by:
Hello, I am building a system in C# 2.0 using the master - worker design pattern The system is supposed to work as follows: 1. The Master sends Command objects to several workers 2. All Commands are derived from AbstractCommand class (but are significantly different from each other) Since the system is distributed and should be...
2
4611
by: SammyBar | last post by:
Hi all, I'm trying to send a message from ASP.NET to another PC by using MSMQ. I created my ASP.NET project by using Visual Studio 2005 but I initially set the project to be located on the File System. Then I could successfully send, receive and purge the public queries I use to exchange information with the another PC. But when I realized...
0
8117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6274
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2099
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.