I am trying to access an NServiceBus service on a work server from a client at home over a VPN connection. The messag开发者_Python百科e gets to the service OK but the response queue name has the format
DIRECT=OS:MyHomePCName\private$\MyClientQueueName
The reply message sits in the server's outgoing queue presumably because it can't resolve MyHomePCName. Can I change the response queue name when sending the message to the following format?
DIRECT=TCP:MyHomeIPAddress\private$\MyClientQueueName
Of course I still have the problem of sending the IP address for the VPN connection, but I'm only testing at the moment and don't mind hard coding that in the client for now.
NSB should format it correctly if you put "$queueName@$homeIpAddress". Here is the code it uses:
public static string GetFullPath(string value){
IPAddress ipAddress;
if (IPAddress.TryParse(GetMachineNameFromLogicalName(value), out ipAddress))
{
return (PREFIX_TCP + GetFullPathWithoutPrefix(value));
}
return (PREFIX + GetFullPathWithoutPrefix(value));
}
精彩评论