Tag: wcf

dotnet核心应用程序不从docker容器写入WebDAV

我刚刚完成了一个dotnet核心应用程序的testing,并且在本地运行时工作正常。 唉,这个练习的重点就是让它在一个稳定的环境中运行。 我select了azure(linux)上的docker容器作为这个环境。 我已经在Azure Docker容器上部署了应用程序,除了WebDAV写入以外,所有方面都运行良好。 其他一些细节可能会缩小范围: WebDAV服务器托pipe在我的本地networking上(所有端口都正确转发)。 有authentication,但我相当肯定,这不是问题。 该应用程序运行5个线程,每个具有特定的任务(REST API,监视器logging器等)。 所有线程接受错误logging到WebDAV运行良好。 testing是在docker集装箱外完成的。 当然,如果应用程序写入本地文件,这将需要在容器设置映射,但由于它是WebDAV我不认为容器应该改变任何东西,对吧? 编辑:7/8/2017 在仔细研究这些之后,我发现它与这个 (据称是固定的)WCF错误有关。 不过,我仍然遇到这个错误。 我也注意到Docker容器和mongo之间的很多TCP连接问题。 我需要安装哪些软件包才能在Docker容器中正常工作? 我需要什么文件夹映射?

尝试访问Dockerized WCF服务时出现403错误

作为一个总的.NET noob我试图dockerize传统的WCF服务,但即将到来 403 – 禁止:访问被拒绝。 您无权使用您提供的凭据查看此目录或页面。 客户端错误消息,同时试图达到他们。 这里是他们相关的configuration文件的一个片段: <behaviors> <serviceBehaviors> <!– This service provides service certificate. Username client credential expected –> <behavior name="WCFServiceTypeBehaviors" > <serviceMetadata httpGetEnabled="true" /> <serviceCredentials> <serviceCertificate findValue="XXXXXXXXXXXXXXXXXXXXXXXXXXXX" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" /> <clientCertificate> <authentication certificateValidationMode="None" /> </clientCertificate> <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WCFServiceProject.UsernameValidator, App_Code" /> <issuedTokenAuthentication allowUntrustedRsaIssuers="true" /> </serviceCredentials> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> 所以从我研究的东西看来,WCF似乎基于x509证书进行身份validation,显然我的Docker容器一旦启动就不会包含它们。 […]

Docker WCF net.pipe

我正在尝试使用net.pipe,但没有运气得到它与docker工作。 我有这个工作与运行IIS的Windows Server 2016虚拟机没有问题。 任何信息或样品如何得到这个工作将是非常有益的! 服务器信息操作系统:Windows Server 2016的DockerFile:从微软/ Windows服务器的Docker for Windows 互联网 – >端口80和443 – > ASP.NET MVC前端 – > net.pipe – > WCF服务 WCF终点 DockerFile RUN Install-WindowsFeature -name NET-WCF-Pipe-Activation45 RUN Import-Module "WebAdministration"; New-Item IIS:\AppPools\NewPool; New-Item IIS:\Sites\NewSite -physicalPath 'C:\Service' -bindings @{protocol='https';bindingInformation='*:19001:'}; New-ItemProperty 'IIS:\Sites\NewSite' -name bindings -Value @{protocol='net.pipe';bindingInformation='localhost/servicelocation'}; Set-ItemProperty IIS:\Sites\NewSite -name applicationPool -value NewPool; Set-ItemProperty IIS:\Sites\NewSite […]

无法连接到托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 […]

Docker中运行的Dotnet核心Web API在使用外部WCF服务时无法进行身份validation

我正在使用dotnet核心1.1.2构build一个RESTful API。 这个api的很大一部分需要向外部WCF服务发出请求。 这些请求通过使用用户名,密码和域的基于Windows的身份validation进行身份validation。 我目前正在准备API生产的过程,我想尝试dockerizing它。 我遇到的问题是,只要从Docker容器中调用此身份validation,此身份validation就无法通过此第三方WCF服务。 使用dotnet运行时API运行在Windows和Mac上,并且服务得到authentication。 我使用Visual Studio 2017的Connect wcf服务function来使用WCF服务,然后使用正确的身份validation模式修改端点绑定。 public ServiceSoapClient(EndpointConfiguration endpointConfiguration, string username, string password, string domain) : base(ServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), ServiceSoapClient.GetEndpointAddress(endpointConfiguration)) { this.ChannelFactory.Credentials.Windows.ClientCredential.UserName = username; this.ChannelFactory.Credentials.Windows.ClientCredential.Password = password; this.ChannelFactory.Credentials.Windows.ClientCredential.Domain = domain; this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.ServiceSoap)) { System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding(); […]