google了一下觉得应该可以,但是为什么我的代码就有问题呢?using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Messaging;namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            MessageQueue.Create(@"RemoteMachineName\Private$\rxq");
            ...
        }
    }
}
该远程机和本机Interactive的账户同为一个域账户,且为管理员权限。但是我能在本机为所欲为,就是不能在远程机上操纵Queue,创建,引用都不行,报错:
{"Invalid queue path name."}
   at System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException)
   at System.Messaging.MessageQueue.get_FormatName()
   at System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan timeout, Int32 action, CursorHandle cursor, MessagePropertyFilter filter, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
   at System.Messaging.MessageQueue.Receive()
   at ConsoleApplication1.Program.Main(String[] args) in C:\Users\btslabs\Documents\Visual Studio 2010\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 20
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()