Tag: 顶端

无法连接到托pipe在Docker容器中的WCF服务

我试图运行一个应用程序,在Docker容器中公开WCF服务。 该应用程序是使用TopShelf构build的,因此它既可以作为Windows服务运行,也可以作为独立的控制台程序(在开发中)运行。 我遇到的问题是WCFtesting客户端无法获取元数据。 值得一提的是,应用程序在本地执行时能正常工作。 这是当应用程序在本地运行时由WCFtesting客户端生成的元数据文件 <?xml version="1.0" encoding="utf-8"?> <configuration> <system.serviceModel> <bindings> <netTcpBinding> <binding name="NetTcpBinding_ITestWcfDocker" sendTimeout="00:05:00"> <security mode="None" /> </binding> </netTcpBinding> </bindings> <client> <endpoint address="net.tcp://localhost:9998/" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_ITestWcfDocker" contract="ITestWcfDocker" name="NetTcpBinding_ITestWcfDocker" /> </client> </system.serviceModel> </configuration> 这是我使用构build容器的Dockerfile FROM microsoft/dotnet-framework:4.6.2 RUN powershell -Command Add-WindowsFeature NET-WCF-HTTP-Activation45 WORKDIR app COPY bin/Release/net461 . EXPOSE 9998 9999 ENTRYPOINT ["EMG.Service.TestWcfDocker.exe"] 在构build项目之后,我使用此命令构build容器 docker build -t emg/test-wcf:latest […]