Author |
Message
|
JavierCaptain |
Posted: Wed Jul 05, 2006 6:45 am Post subject: VB.Net impossible to Put message(with .net framework 2.0) |
|
|
Novice
Joined: 05 Jul 2006 Posts: 14
|
Hi all
we've just installed WebSphere MQ v5.3 CSD 11, and we're trying to write a VB.NET "Windows Application" to put a message on a queue through a client connection.
We've created an environment variable called NMQ_MQ_LIB = mqic32.dll, and we've added a reference to amqmdnet.dll in our project.
Then program is:
Imports IBM.WMQ
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'CLIENT CONNECTION SAMPLE
MQEnvironment.Hostname = "yourHostname"
MQEnvironment.Channel = "yourChannelName"
Dim mqQMgr As MQQueueManager = New MQQueueManager("yourQueueManagerName")
Dim mqQueue As MQQueue = mqQMgr.AccessQueue("yourQueueName", MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_OUTPUT)
Dim mqMsg As MQMessage = New MQMessage
mqMsg.Persistence = MQC.MQPER_NOT_PERSISTENT
mqMsg.Format = MQC.MQFMT_STRING
mqMsg.WriteString("HI ALL")
Dim mqPutMsgOpts As MQPutMessageOptions = New MQPutMessageOptions
mqQueue.Put(mqMsg, mqPutMsgOpts)
mqQueue.Close()
mqQMgr.Disconnect()
End Sub
End Class
Our problem is a "FatalExecutionEngineError" detected on the mqQueue.Put(mqMsg, mqPutMsgOpts):
this is the Message:
FatalExecutionEngineError was detected
The runtime has encountered a fatal error. The address of the error was at 0x79e755fc, on thread 0x8ac. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Have you the same problem?
Thanks for your replies
Bye, ciao
Last edited by JavierCaptain on Fri Jul 07, 2006 5:09 am; edited 1 time in total |
|
Back to top |
|
 |
JavierCaptain |
Posted: Fri Jul 07, 2006 5:08 am Post subject: |
|
|
Novice
Joined: 05 Jul 2006 Posts: 14
|
Hi,
we've found that the problem could depend on .net framework version ...in fact after we have removed .net framework 2.0 and installed 1.1 version...the program worked...
Are you informed about this problem? Is there a solution to solve the problem on .net 2.0?
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jul 07, 2006 3:08 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
MQ's .Net interface is not yet supported on .Net 2.0. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JavierCaptain |
Posted: Tue Jul 11, 2006 7:51 am Post subject: |
|
|
Novice
Joined: 05 Jul 2006 Posts: 14
|
But we need .net framework ver 2.0 for programming in visual studio 2005...
Is there a way to work under visual studio 2005 using mq classes for .net?
Thanks |
|
Back to top |
|
 |
ewilliams |
Posted: Mon Aug 21, 2006 9:05 pm Post subject: |
|
|
 Apprentice
Joined: 27 Nov 2002 Posts: 30 Location: Portland
|
JavierCaptain wrote: |
But we need .net framework ver 2.0 for programming in visual studio 2005...
Is there a way to work under visual studio 2005 using mq classes for .net?
Thanks |
For what ever reason you 'need' VS 2005 but can compile to the .Net Framework 1.1 give MSBee a try. It is a MSBuild toolkit that will let you compile applications in VS 2005 to .Net 1.1.
http://www.codeplex.com/Wiki/View.aspx?ProjectName=MSBee |
|
Back to top |
|
 |
saketr |
Posted: Wed Aug 23, 2006 5:58 am Post subject: |
|
|
Apprentice
Joined: 08 Feb 2006 Posts: 41
|
|
Back to top |
|
 |
leehairy |
Posted: Wed Sep 06, 2006 5:01 am Post subject: |
|
|
Novice
Joined: 04 Aug 2006 Posts: 13
|
I have been running MQ5.3 with .NET2 for some time now with absolutely no issues. Except 1 ... i cannot remember the exact issue, but it occurred on one machine with a locked down installation of Win2003installed.
Installing CSD12 fixed this issue.
Are you using the correct library and namespaces?
you only need to use :
using IBM.WMQ;
and use library 'amqmdnet'
My version of amqmdnet is 1.0.0.3, |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 06, 2006 5:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
leehairy wrote: |
I have been running MQ5.3 with .NET2 for some time now with absolutely no issues. |
Except that it's not supported. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
klamerus |
Posted: Fri Sep 08, 2006 4:03 pm Post subject: |
|
|
 Disciple
Joined: 05 Jul 2004 Posts: 199 Location: Detroit, MI
|
Support isn't always what it's cracked up to be.
Working is usually better. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 08, 2006 5:41 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
klamerus wrote: |
Support isn't always what it's cracked up to be.
Working is usually better. |
I agree.
Support is only important when things aren't working. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Fri Sep 08, 2006 5:54 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
....and it seems that for the original poster they aren't.
I wonder if a companies CEO agrees that the cost of the upgrade is worth the money and time when things DO go wrong?.....especially a if it is a no charge upgrade. Hmmmmm  |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Sep 09, 2006 5:19 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm always of the opinion that downtime is more expensive than maintenance. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
leehairy |
Posted: Tue Sep 12, 2006 8:19 am Post subject: |
|
|
Novice
Joined: 04 Aug 2006 Posts: 13
|
I have to agree with the "not supported" comments.
Unfortunately until i read this thread i was unaware that the MQ .NET api was unsupported for .Net2. I guess i have been lucky.
That aside - the orginal poster mentioned the use of mqic32.dll and the NMQ_MQ_LIB environment variable. For my unsupported applications i have never had to set this variable.
However my application did crash at one stage during MQOpen, a quick look with windbg and i found the problem. Luckily CSD012 fixed this.
Have you fully patched your mq client ? |
|
Back to top |
|
 |
klabran |
Posted: Wed Sep 27, 2006 9:42 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Does anyone have any dirt from big blue as to when they will have a 2.0 supported .net library? |
|
Back to top |
|
 |
klamerus |
Posted: Wed Sep 27, 2006 3:39 pm Post subject: |
|
|
 Disciple
Joined: 05 Jul 2004 Posts: 199 Location: Detroit, MI
|
I'm afraid that's probably going to come right after they start publishing useful books on the use of MQ from .Net.
At this point, their one red book on the subject barely makes provides any .Net code samples at all. |
|
Back to top |
|
 |
|