Author: netproblems | Posted on: 4/12/2010 12:25:08 PM | Views : 446

To meet the needs of a colleague, I must get plian text into a MSMQ message queue.  Trouble is, Sytem.Messaging results in a body wich defaults to xml content.  I had thoght that this would get round the problem - but it doesn't:
Imports System Imports System.Messaging Imports System.IO Partial Class test_testmsmq2 Inherits System.Web.UI.Page Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click Dim q As MessageQueue q = New MessageQueue(".\private$\xxxxxx") Dim messageLabel As String = "Test mk3" Dim messageBody As String = "Test Text Message" Dim msg As New Message msg.Label = messageLabel Dim writer As New IO.StreamWriter(msg.BodyStream) writer.Write(messageBody) writer.Flush() q.Send(msg) Label1.Text = "Message sent" End ...

Go to the complete details ...