Author |
Message
|
tariq |
Posted: Tue Jun 20, 2006 2:03 am Post subject: Can not create MQQueueManager with ASP.NET code |
|
|
Newbie
Joined: 20 Jun 2006 Posts: 6
|
hi
MQQueueManager qm = new MQQueueManager("SampleQueueManager", "SampleChannel", "192.168.2.17(1000)");
this line of code is executed in C# project but it is not working in ASP.NET project
not even in ASPX file
nor in CS file
if the project is web based ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 20, 2006 2:38 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
what does it mean "not working"?
How do you know it doesn't work? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PieterV |
Posted: Tue Jun 20, 2006 3:42 am Post subject: |
|
|
Disciple
Joined: 04 Jan 2006 Posts: 164 Location: Belgium
|
according to your title, you expect it to create a qmgr.
but that code you gave us tries to connect to an already existing qmgrs.
you cannot create a qmgr in .NET code (at least not with my knowledge). |
|
Back to top |
|
 |
wschutz |
Posted: Tue Jun 20, 2006 5:47 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I suspect he simply means he's trying to create an instance of the MQQueueManager class in his program, not that he's actually trying to create a qmgr. _________________ -wayne |
|
Back to top |
|
 |
saketr |
Posted: Wed Jun 21, 2006 4:44 am Post subject: |
|
|
Apprentice
Joined: 08 Feb 2006 Posts: 41
|
As Jeff mentioned, what is the error or exception details when executed in ASP.NET? |
|
Back to top |
|
 |
varholl |
Posted: Wed Jun 21, 2006 5:49 am Post subject: |
|
|
Novice
Joined: 23 May 2006 Posts: 21 Location: Argentina
|
Why don't you try this:
MQEnvironment.Channel = strChannel;
MQEnvironment.Hostname = strHost;
MQEnvironment.Port = intPort;
MQQueueManager MqM = new MQQueueManager(qManager);
I used this code to connect to a Queue Manager and it worked perfectly, good luck!!  _________________ Consulting on web based Systems. |
|
Back to top |
|
 |
JasonE |
Posted: Thu Jun 22, 2006 12:15 pm Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Whats the error?
What userid is the asp.net application running under (does setting an MCAUSERID on the svrconn channel as a temporary test allow it to work)?
I am suspicious this will end up running under netwrok service, which isnt going to easily work with MQ |
|
Back to top |
|
 |
bhu |
Posted: Thu Jul 13, 2006 10:11 am Post subject: |
|
|
Novice
Joined: 27 Jun 2006 Posts: 19
|
i am also getting the same error when i try to create QManger instance.
queueManger = new MQQueueManager() from a Web Service.
i have tried to set MQEnvironment variables, same error.
any idea ?
thanks
bhu |
|
Back to top |
|
 |
JasonE |
Posted: Fri Jul 14, 2006 12:28 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Again, What userid is the web service running under, and what is the error (exactly)... You cant set MQEnvironment userid for .net, it will always use the userid the process is running under (or is currently impersonating, anyway) |
|
Back to top |
|
 |
|