Hey y'all, anybody done anything with MessageQueuing yet under .NET? Below is some code below that writes a simple "Hello World" message to a queue. When I inspect the message body (on the server), it shows up as an XML string.
Any idea how I can stop this? I've been looking at the String class to see if it has any properties to stop this, but haven't found anything yet.
[tt]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim QueueName As String
Dim q As System.Messaging.MessageQueue
Dim sTemp As String = "Hello World"
GetMQName(QueueName)
q = New System.Messaging.MessageQueue()
q.Path = QueueName
q.Send(sTemp, "Hello Label"
q.Close()
End Sub
Private Function GetMQName(ByRef MQName As String) As Boolean
Dim rk As RegistryKey = Registry.LocalMachine
GetMQName = True
Try
rk = rk.OpenSubKey("SOFTWARE\MyCompany\EvtSvc"
MQName = rk.GetValue("MQName"
Catch
GetMQName = False
End Try
End Function
[/tt]
Any idea how I can stop this? I've been looking at the String class to see if it has any properties to stop this, but haven't found anything yet.
[tt]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim QueueName As String
Dim q As System.Messaging.MessageQueue
Dim sTemp As String = "Hello World"
GetMQName(QueueName)
q = New System.Messaging.MessageQueue()
q.Path = QueueName
q.Send(sTemp, "Hello Label"
q.Close()
End Sub
Private Function GetMQName(ByRef MQName As String) As Boolean
Dim rk As RegistryKey = Registry.LocalMachine
GetMQName = True
Try
rk = rk.OpenSubKey("SOFTWARE\MyCompany\EvtSvc"
MQName = rk.GetValue("MQName"
Catch
GetMQName = False
End Try
End Function
[/tt]