John Sharp による「Windows Communication Foundation 4」の例に従っています。88 ~ 89 ページに、サービスの登録方法と開始方法が示されています。サービスが開始されません。
自分のホストで net.tcp を使用してサービスを実行できなかったと言う必要があります。これは、ポートが使用されていることに不満があり、これはnamedPipesを使用する必要があるためです。
アプリケーションログのエラーは
Service cannot be started. System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:8080/ProductsService/Service.svc/ because TCP port 8080 is being used by another application. ---> System.Net.HttpListenerException: The process cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.Communicat...
あなたの助けに感謝します。