-1

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...

あなたの助けに感謝します。

4

2 に答える 2

4

エラーの最初の行にあるように

TCP ポート 8080 が別のアプリケーションによって使用されているため、HTTP は URL http://+:8080/ProductsService/Service.svc/を登録できませんでした。

ポート 8080 で登録しようとしていますが、ポート 8080 は別のアプリケーションによって使用されています。使用されていないポート番号が見つかるまで、ポート番号を変更してみてください。

于 2012-04-04T18:47:32.383 に答える
2

別のサービスがそのポートを使用しています

8084を試してください

于 2012-04-04T18:44:48.510 に答える