简体   繁体   English

WSDualHttpBinding在某些计算机上不起作用

[英]WSDualHttpBinding wont work on some computers

I have an wcf that uses an wsdusalhttpbinding 我有一个使用wsdusalhttpbinding的wcf

WSDualHttpBinding binding = new WSDualHttpBinding();
binding.MaxBufferPoolSize = int.MaxValue;
binding.MaxReceivedMessageSize = int.MaxValue;
binding.Security.Mode = WSDualHttpSecurityMode.None;
binding.Security.Message.ClientCredentialType = MessageCredentialType.None;

_host.AddServiceEndpoint(typeof(IService), binding, baseAddress + "/ws");

//Mex
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
smb.HttpGetEnabled = true;
_host.Description.Behaviors.Add(smb);

_host.Open();

Now this works on my computer and one of my colleagues but on some computers we get this error. 现在,这可以在我的计算机和我的一位同事上使用,但在某些计算机上,我们会收到此错误。

在此处输入图片说明

The stacktrace leads to this line. stacktrace导致这一行。

_host.Open();

I dont understand why it would say WebHttpBinding the only endpoint I use for this service is the one I create with the code I wrote. 我不明白为什么会说WebHttpBinding我用于此服务的唯一端点是我用编写的代码创建的端点。

It seems i found the problem! 看来我发现了问题!

.net 4.0 on the faulted computers had the os "Windows embedded" or POS ready OS. 出现故障的计算机上的.net 4.0操作系统为“ Windows Embedded”或POS就绪操作系统。 there must be something missing in the OS of those computers because i installed .NET 4.5 even though my project only requires 4.0. 这些计算机的操作系统中肯定缺少某些东西,因为即使我的项目只需要4.0,我也安装了.NET 4.5。 and now it works. 现在可以了。

I have no idea what the error message means but its maybe som wrong pointer or something. 我不知道该错误消息是什么意思,但它可能是错误的指针或某些东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM