Author |
Message
|
ddm |
Posted: Mon Dec 01, 2003 5:09 pm Post subject: Using the MQEnvironment object in .NET |
|
|
Apprentice
Joined: 17 Nov 2003 Posts: 40
|
I am having problems in using the MQEnvironment object in .NET. I properly set up the Host Name and Channel properties of this object but when I try to connect to a particular Queue Manager it is giving me an "2058 Error in application."
However, if i don't set anything on the MQEnvironment object and just pass a blank Queue Manager name, it works fine.
I even tried setting up an NMQ_MQ_LIB with a value "CLIENT" but it did not work either.
What am I missing? |
|
Back to top |
|
 |
JasonE |
Posted: Tue Dec 02, 2003 2:02 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
nmq_mq_lib should be set to mqic32.dll not client (docs are wrong) to *force* a client channel. However, if you have set the hostname property then we will use a client connection anyway.
Are you sure you are running the 5.3 csd05 version of .NET and not the support pack - Its possible there are fixes in the csd05 version...
Whats your code look like? Are you sure the svrconn name, hostname, port are correct and a listener is running? For example can you get nmqsput to work in client bindings mode by passing the parms on the command line correctly? |
|
Back to top |
|
 |
ddm |
Posted: Wed Dec 03, 2003 11:18 am Post subject: |
|
|
Apprentice
Joined: 17 Nov 2003 Posts: 40
|
I tested with nmqsput. I am getting an error if I specify 3 params(channel/tcp/connection name).
I installed CSD05 on my machine.
Here's a piece of my c# .net code which is very straight forward:
MQEnvironment.Hostname = mHost;
MQEnvironment.Channel = mChannel;
MQEnvironment.Port = 1414;
mQMgr = new MQQueueManager(mQMgrName);
Is there a special setting to use MQEnvironment? Everything works fine if I don't set anything on the MQEnvironment object whether mQMgrName has a value or not.
Thanks! |
|
Back to top |
|
 |
ddm |
Posted: Wed Dec 10, 2003 3:43 pm Post subject: |
|
|
Apprentice
Joined: 17 Nov 2003 Posts: 40
|
When I try to set the Host and Channel Properties on the MQEnvironment, I am still getting Error: 2059 Error in the Application.
I retested NMQSPUT with the 3 parameters and it worked.
(queue name, queue manager name, "channel-name/transport-type/connection-name")
I do not know what's wrong. Please help.
Here's some more info: I have a remote MQ Server |
|
Back to top |
|
 |
JasonE |
Posted: Thu Dec 11, 2003 2:10 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Take a trace of the failure and send it to me (zipped) - I'll pm you my email addr. |
|
Back to top |
|
 |
ddm |
Posted: Thu Dec 11, 2003 1:45 pm Post subject: |
|
|
Apprentice
Joined: 17 Nov 2003 Posts: 40
|
Thanks a lot Jason. You're the man! I am putting on the wrong Host Name.
Thanks again. |
|
Back to top |
|
 |
|