ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MQSeries Client in .NET

Post new topic  Reply to topic
 MQSeries Client in .NET « View previous topic :: View next topic » 
Author Message
greg
PostPosted: Fri Mar 25, 2005 8:07 am    Post subject: MQSeries Client in .NET Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

Hi, I posted similar topic on this forum, but a lot of time I changed my configuration on MQSeries Server site, so a lot of people from this forum reproved my that in this way they can't help me.
So I am starting new topic, and I am not going to change anything on the configuration until somebady give an advice.

I have two machine:
1. On a machine_1 ( "10.0.0.99(1115)" ) I instaled MQSeries Server and Client, and I created:

QueueManagerName = "TVTEST";
QueueName = "QUEUE.TEST" it is local queue
channelName = "SVRCONN.TEST" - it is server connection channel

2. On a machine_2 (10.0.0.66) I instaled MQSeries Client and MQ classes for .NET

I added MQSERVER environment variable on this machine like below:
MQSERVER = SVRCONN.TEST/TCP/10.0.0.99(1115)

and I tried to run sample program which was added to MQ classes for .NET package, but I got an error:

An unhandled exception of type 'System.NullReferenceException' occurred in amqmdnet.dll
Additional information: Object reference not set to an instance of an object.


Both machines runs Windows XP
any advice????
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Mar 25, 2005 8:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

what error does amqsputc from machine2 to machine1 give?
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
fjb_saper
PostPosted: Fri Mar 25, 2005 11:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

The MQServer environment variable does not work in .NET like in c

With the client .NET classes the behavior for connection information is much closer to the java environment.

Read up on .NET documentation and set your
MQEnvironment class properties.

Enjoy
Back to top
View user's profile Send private message Send e-mail
greg
PostPosted: Fri Mar 25, 2005 1:03 pm    Post subject: Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

1. How I can use amqsputc.exe from machine_2 to machine_1???
On machine_2 I have not created any queue.

2. I seted MQEnvironment class but still the same error.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Mar 25, 2005 1:08 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

amqsputc is using the MQ Client to connect to the QM on machine 1

so when all is well...

amqsputc QUEUE.TEST TVTEST should do the trick ...

if amqsputc fails, you have got something wrong in your configuration as amqsputc is known to work...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
greg
PostPosted: Fri Mar 25, 2005 1:16 pm    Post subject: Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

Ok, now I understand your point.
I going to try it when I will go to work.
Thank you.
Back to top
View user's profile Send private message
malammik
PostPosted: Mon Mar 28, 2005 6:54 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

Try adding the dll on the client side to global access registry.
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
greg
PostPosted: Tue Mar 29, 2005 12:39 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

When I tried run amqsputc QUEUE.TEST TVTEST on the server side I got en error:
MQCONN ended with reason code 2058
When I tried use amqsputc command to MQ manager, and queue which were created default when I instaled MQSeries I got the same error.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Tue Mar 29, 2005 12:56 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

you say serverside so I think you did amqsputc on machine1 ?

on machine1 did you set: SET MQSERVER=SVRCONN.TEST/TCP/10.0.0.99(1115) ?
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
greg
PostPosted: Tue Mar 29, 2005 8:16 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

I heard that for .NET it is not necessary set this environment:
SET MQSERVER=SVRCONN.TEST/TCP/10.0.0.99(1115)
(for C++ is it but now for . NET)
However I changed this fragment of code:

Code:
queueManager = new MQQueueManager( QueueManagerName, channelName, connectionName );


and I added new one:

Code:
MQEnvironment.hostname = "10.0.0.99";
MQEnvironment.channel = "SVRCONN.TEST";
MQEnvironment.port = 1115;


and it works for me!!!
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Tue Mar 29, 2005 9:11 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

greg wrote:
I heard that for .NET it is not necessary set this environment:
SET MQSERVER=SVRCONN.TEST/TCP/10.0.0.99(1115)

you said you were using amqsputc, that's what I responded to
greg wrote:

(for C++ is it but now for . NET)
However I changed this fragment of code:

Code:
queueManager = new MQQueueManager( QueueManagerName, channelName, connectionName );


and I added new one:

Code:
MQEnvironment.hostname = "10.0.0.99";
MQEnvironment.channel = "SVRCONN.TEST";
MQEnvironment.port = 1115;


and it works for me!!!

good! happy MQing
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
greg
PostPosted: Wed Mar 30, 2005 7:33 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

I wrote connsol application in .NET which can connect to MQServer and it works.
But when I created web application using the same way like abowe I got an error:
IBM.WMQ.MQException: MQRC_NOT_AUTHORIZED
I checked my code and it looks ok.
Any idea??? I omited some setting????
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Mar 30, 2005 7:42 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

greg wrote:
IBM.WMQ.MQException: MQRC_NOT_AUTHORIZED
I checked my code and it looks ok.
Any idea??? I omited some setting????

I think the Web App does not run as the same userid as you tested the console application with.
Use the search button above and search for "2035" error, should give you enough hits and hints
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
greg
PostPosted: Thu Mar 31, 2005 1:10 am    Post subject: Reply with quote

Novice

Joined: 24 Mar 2005
Posts: 20

I added new user to mqm grupe (greg\appnet) on the server side.
Should I put this user to the MAC user ID in propreties of channel SVRCONN?
Now I didn't get error 2035 but MQRC_Q_MGR_NOT_AVAILABLE
And now even my consol application don't works...since I added this user
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 31, 2005 5:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Did you run (runmqsc) REFRESH SECURITY ?

You need to make sure the qmgr got the changes in security.

Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQSeries Client in .NET
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.