0

我正在尝试创建一个 WCF 服务,它以远程系统名称作为参数并获取在其上运行的所有进程。

如果为服务提供相同的系统名称,则它会提供在其上运行的服务的详细信息。但是,如果您提供的机器名称与托管服务的位置不同,则会引发错误。

我得到的错误:

System.ServiceModel.FaultException<System.ServiceModel.ExceptionDetail> was caught
  Message=The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  Source=mscorlib
  Action=http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault
  StackTrace:
    Server stack trace: 
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at ServiceReference1.IService1.GetData(String serverName)
       at ServiceReference1.Service1Client.GetData(String serverName) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\a721c869\c5802e85\App_WebReferences.nbhpvo6i.0.cs:line 53
       at _Default.Button1_Click(Object sender, EventArgs e) in c:\Users\xxxxx\Documents\Visual Studio 2010\WebSites\WebSite1\Default.aspx.cs:line 70
  InnerException:
4

1 回答 1

0

部署了 Web 服务的服务器以及目标服务器应该运行远程过程调用、服务器和远程注册表 Windows 服务。

还要检查端口 9132、9133 和 9134 是否未被防火墙阻止。

于 2012-11-30T11:37:26.450 回答