R
rahul
Hi all,
I am trying to upload some data into a remote private queue which is
on a server on a pubic network. I am not getting the data uploaded in
the message queue but am also not getting any error messages.
Pls help me to solve this issue.
i am putting the code which i used for uploading the data into the
server.
Public Sub SendToQueue()
Dim remoteQueue As Messaging.MessageQueue = New
System.Messaging.MessageQueue
remoteQueue.DefaultPropertiesToSend.Priority =
System.Messaging.MessagePriority.VeryHigh
remoteQueue.Formatter = New
System.Messaging.XmlMessageFormatter(New String(-1) {})
Dim lsMSMQPath As String
Dim AppPath As String = IO.Path.GetDirectoryName( _
Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase.ToString())
Dim _deviceIPAddress As String = String.Empty
Dim localHostName As String = Net.Dns.GetHostName()
Dim iphe As Net.IPHostEntry =
Net.Dns.GetHostEntry(localHostName)
Dim ipAddr As String = String.Empty
For Each addr As Net.IPAddress In iphe.AddressList
ipAddr = addr.ToString()
Next
_deviceIPAddress = ipAddr
lsMSMQPath = "FormatNameIRECT=OS:ServerName\private$
\PrivateQueueName;XACTONLY"
remoteQueue.Path = lsMSMQPath
Dim responseQueue As messaging.messageQueue = New
Messaging.MessageQueue
Dim adminQueue As messaging.messageQueue = New
Messaging.MessageQueue
responseQueue.Path =
String.Format(System.Globalization.CultureInfo.InvariantCulture,
"FormatNameirect=TCP:{0}\private$\MyResponse", _deviceIPAddress)
adminQueue.Path =
String.Format(System.Globalization.CultureInfo.InvariantCulture,
"FormatNameirect=TCP:{0}\private$\MyAdmin", _deviceIPAddress)
Dim msg As Message = New Message
msg.Body = "My data"
msg.Label = "My Label"
msg.TimeToBeReceived = System.TimeSpan.Parse("1.00:00:00")
msg.TimeToReachQueue = System.TimeSpan.Parse("1.00:00:00")
msg.ResponseQueue = responseQueue
msg.AdministrationQueue = adminQueue
msg.AcknowledgeType = Messaging.AcknowledgeTypes.FullReceive
Or Messaging.AcknowledgeTypes.FullReachQueue
msg.UseDeadLetterQueue = True
msg.UseJournalQueue = True
remoteQueue.Send(msg,
Messaging.MessageQueueTransactionType.Single)
End Sub
the code is throwing no error after sending the data to the queue.
But the data is not reflected.
I am able to send data to a remote private queue in my network. But
not to a remote computer on the public network.
I am trying to upload some data into a remote private queue which is
on a server on a pubic network. I am not getting the data uploaded in
the message queue but am also not getting any error messages.
Pls help me to solve this issue.
i am putting the code which i used for uploading the data into the
server.
Public Sub SendToQueue()
Dim remoteQueue As Messaging.MessageQueue = New
System.Messaging.MessageQueue
remoteQueue.DefaultPropertiesToSend.Priority =
System.Messaging.MessagePriority.VeryHigh
remoteQueue.Formatter = New
System.Messaging.XmlMessageFormatter(New String(-1) {})
Dim lsMSMQPath As String
Dim AppPath As String = IO.Path.GetDirectoryName( _
Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase.ToString())
Dim _deviceIPAddress As String = String.Empty
Dim localHostName As String = Net.Dns.GetHostName()
Dim iphe As Net.IPHostEntry =
Net.Dns.GetHostEntry(localHostName)
Dim ipAddr As String = String.Empty
For Each addr As Net.IPAddress In iphe.AddressList
ipAddr = addr.ToString()
Next
_deviceIPAddress = ipAddr
lsMSMQPath = "FormatNameIRECT=OS:ServerName\private$
\PrivateQueueName;XACTONLY"
remoteQueue.Path = lsMSMQPath
Dim responseQueue As messaging.messageQueue = New
Messaging.MessageQueue
Dim adminQueue As messaging.messageQueue = New
Messaging.MessageQueue
responseQueue.Path =
String.Format(System.Globalization.CultureInfo.InvariantCulture,
"FormatNameirect=TCP:{0}\private$\MyResponse", _deviceIPAddress)
adminQueue.Path =
String.Format(System.Globalization.CultureInfo.InvariantCulture,
"FormatNameirect=TCP:{0}\private$\MyAdmin", _deviceIPAddress)
Dim msg As Message = New Message
msg.Body = "My data"
msg.Label = "My Label"
msg.TimeToBeReceived = System.TimeSpan.Parse("1.00:00:00")
msg.TimeToReachQueue = System.TimeSpan.Parse("1.00:00:00")
msg.ResponseQueue = responseQueue
msg.AdministrationQueue = adminQueue
msg.AcknowledgeType = Messaging.AcknowledgeTypes.FullReceive
Or Messaging.AcknowledgeTypes.FullReachQueue
msg.UseDeadLetterQueue = True
msg.UseJournalQueue = True
remoteQueue.Send(msg,
Messaging.MessageQueueTransactionType.Single)
End Sub
the code is throwing no error after sending the data to the queue.
But the data is not reflected.
I am able to send data to a remote private queue in my network. But
not to a remote computer on the public network.