2

私は自分のランタイムである間に完璧に動作するサービスホストを作成しました。さらに、プラグインとして外部から呼び出すことができるプラグイン インターフェイスを追加しました。ロギング中に、サービスホストが正しく開始されているのに到達できないことがわかります?!?

私のサービスホスト:

_myHost = new ServiceHost(typeof(MyHostClass));
ServiceEndpoint endpoint = _myHost.AddServiceEndpoint(typeof (IMyHost), new NetTcpBinding(), "net.tcp://localhost:1234/MyHost");
_myHost.Description.Behaviors.Find<ServiceDebugBehavior>().IncludeExceptionDetailInFaults = true;
_myHost.Open();

これは例外なく機能しています。開いた状態

私もhttpアドレスで試してみましたが、ウェブサイトは呼び出し可能ではありません:

_myHost = new ServiceHost(typeof(MyHostClass), new Uri("http://localhost:7777/MyHost"));

外部からのプラグイン呼び出し元:

Instance = (IPlugIn)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()))
Instance.Initialize();

インスタンスは正しく作成され、機能します

私のWCFコネクタは次のようになります。

NetTcpBinding binding = new NetTcpBinding();
EndpointAddress address = new EndpointAddress("net.tcp://localhost:1234/MyHost");
ChannelFactory<IMyHost> factory = new ChannelFactory<IMyHost>(binding);
_proxy = factory.CreateChannel(address);

到達不能のためタイムアウト

4

0 に答える 0