.NETGURU
QC deadqueue debugging
Messages   Related Types
This message was discovered on microsoft.public.dotnet.distributed_apps.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Steven
Hi,
I have a vb.net 2003 queued component system on Win2k Server. It is
sending string messages. Upon occasion, a message winds up in the deadqueue
and I am trying to determine why. So far, when I attempt to read the
message with the following code; the code throws a System.Xml.XmlException.
The exception message is 'Invalid character, line 1, position 5'. How can I
read the message to see what is in line 1, position 5?

Dim queue As New MessageQueue(".\" & TreeView1.SelectedNode.Parent.Text)
queue.Formatter = New XmlMessageFormatter(New String() {"System.String"})

Dim qenum As MessageEnumerator

qenum = queue.GetMessageEnumerator

While qenum.MoveNext

Dim m As Message = qenum.Current

If m.Label = TreeView1.SelectedNode.Text Then

txtBody.Text = m.Body <== error thrown here

End IF

Exit While

Reply to this message...
 
    
DaveS (VIP)
It fails because the queue message is not your string only - rather its the
recording of the calls to the queued component (that's what queued components
does for you).
I've found the best way to debug is to attach to the process in com+ running
your dll (either the app or in the case of a server app, its dllhost.exe)
with vs.net and then run a vb script like the following to throw the
deadqueue messages back to the app queue.
HTH

' This script should be setup to run upon system bootup in windows task
scheduler
Dim objMsgMover
dim lMessagesMoved
Set objMsgMover = CreateObject("QC.MessageMover")

objMsgMover.SourcePath = ".\private$\myapp_deadqueue"
objMsgMover.DestPath = ".\myapp"

lMessagesMoved = objMsgMover.MoveMessages

WScript.Echo lMessagesMoved & " messages moved from '" &
objMsgMover.SourcePath & "' to '" & objMsgMover.DestPath & "'."

Set objMsgMover = Nothing

"Steven" wrote:

[Original message clipped]

Reply to this message...
 
 
System.Messaging.MessageEnumerator
System.Messaging.MessageQueue
System.Messaging.XmlMessageFormatter
System.String
System.Xml.XmlException




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification