天道酬勤,学无止境

wshttpbinding

WCF 错误未提供客户端证书。 在 ClientCredentials 中指定客户端证书(WCF error The client certificate is not provided. Specify a client certificate in ClientCredentials)

问题 我正在尝试调用 WCF 服务。我创建了一个自签名证书并安装在我的 localmachine \personnal \certificates 中,并且我还在我的部分中添加了它。但我不明白为什么会出现这个错误。 这是我的 web.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="wsHttpEndpoint"> <security mode="Transport"> <transport clientCredentialType="Certificate" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="https://abcdxyz.abc.syntax.com/TestCCService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpoint" contract="TestCCService.ITestCCService" name="wsHttpEndpoint" /> <

2021-07-11 13:21:55    分类:技术分享    wcf   wshttpbinding

为什么 InstanceContextMode.PerSession 在使用 wsHttpBinding 时表现得像 PerCall?(Why InstanceContextMode.PerSession behave like PerCall when using wsHttpBinding?)

问题 我有使用 SOAP 1.2 的 AJAX 客户端使用的 WCF 服务 网页配置: <endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" bindingConfiguration="wsHttpBin"> <wsHttpBinding> <binding name="wsHttpBin"> <security mode="None"/> </binding> </wsHttpBinding> 从我读到的内容来看,我必须使用<security mode="None"/>因为使用“wsHttpBinding”绑定公开的服务实现了 WS-* 系列 Web 服务规范的 WS-Security。 由于绑定使用安全性,请求将被拒绝,因为 AJAX 不支持安全性上下文。 我的 WCF 服务行为是用InstanceContextMode.PerSession定义的: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerSession)] 但是当我使用它时,该服务表现为 PerCall,每次调用都会启动一个新的 WCF 实例

2021-07-10 20:29:50    分类:技术分享    ajax   wcf   soap   wshttpbinding   wcf-sessions

wshttpbinding 仅适用于 .net 客户端?(wshttpbinding is only for .net clients?)

问题 wsHttpBinding仅适用于.NET 客户端吗? 因为在 wsHttpBinding 中默认启用了安全性,所以数据传输时加密。 那么非 .NET 客户端(如java 或 php )如何使用这样的 WCF 服务呢? 回答1 我相信 WsHttpBinding 的默认消息安全设置为“Windows”。 这很可能是因为这将使安全性工作开箱即用,至少对于 WCF 服务和客户端而言。 如果您需要互操作,则可以轻松更改此设置。 您可以将其设置为以下任何一项: 窗户(默认) 没有任何用户名证书发行代币 有关更多详细信息,请参阅“wsHttpBinding 的消息”MSDN 页面。 要测试与 Java 或 PHP 客户端的通信,您可以暂时禁用安全性: <wsHttpBinding> <binding> <security mode="Message"> <!-- Not recommended! Use only for testing. --> <message clientCredentialType="None" /> </security> </binding> </wsHttpBinding> 在你开始工作后,你可以切换到 - 例如 - 使用证书,这取决于你的非 WCF 端支持什么。 回答2 正如 Jeroen 所说,默认情况下 wsHttpBinding 默认为消息安全和

2021-07-10 08:54:44    分类:技术分享    java   wcf   wshttpbinding

防火墙后面的 wsDualHttpBinding 和 netTcpBinding 的 WCF 问题(WCF issues with wsDualHttpBinding and netTcpBinding behind firewalls)

问题 我有一个独立的 WCF 服务在防火墙后面的服务器上运行。 它目前使用wsDualHttpBinding作为服务利用回调。 客户端在 LAN 环境中工作正常。 我们已打开防火墙以允许自定义端口上的流量,因此现在可以从外部 LAN 发现服务。 由于wsDualHttpBinding的性质,如果客户端位于自己的防火墙后面,这显然无法工作。 所以自然而然地, netTcpBinding想到应该解决双向问题。 但奇怪的是,当服务配置 XML 更新为在同一端口上包含netTcpBinding (和/或排除wsDualHttpBinding )时,甚至服务发现也不再起作用。 我想知道是否还有其他我遗漏的东西。 我遵循了如何:在 Windows 窗体的 WCF 调用中使用 netTcpBinding 与 Windows 身份验证和消息安全以及 Windows Communication Foundation 快速入门 - 多重绑定 VS2010 中的确切配置建议。 配置: <system.serviceModel> <bindings> <netTcpBinding> <binding name="NetTcpBindingEndpointConfig"> <security mode="Message" /> </binding> </netTcpBinding> </bindings>

2021-07-09 14:45:06    分类:技术分享    wcf   nettcpbinding   wshttpbinding

wshttpbinding support in silverlight 4

Does silverlight 4 beta supports wshttpbinding (wcf)? If not, will it be supported in stable release?

2021-07-01 08:55:45    分类:问答    wcf   silverlight   silverlight-4.0   wshttpbinding

WCF disabling UseNagleAlgorithm while connecting to SQL Azure

Have a bunch of WCF REST services hosted on Azure that access a SQL Azure database. I see that ServicePointManager.UseNagleAlgorithm is set to true. I understand that setting this to false would speed up calls (inserts of records < 1460 bytes) to table storage - the following link talks about it. My Question - Would disabling the Nagle Algorithm also speed up my calls to SQL Azure?

2021-06-27 10:25:09    分类:问答    wcf   azure   azure-sql-database   wshttpbinding

Calling a WCF WebService in PHP via wsHttpBinding

I have a WCF webservice I can connect to it via basicHttp, but not wsHttp. I try to conenct to it via wshttp via the following: $service = new SoapClient ("http://service.companyname.local:6666/Service/?wsdl", array( "location" => "http://service.companyname.local:6666/Service/WCF", "trace" => true, 'soap_version' => SOAP_1_2 ) ); The call to the SoapClient constructor returns fine. When I try to call one using $client->FunctionName, the page just sits there loading for quite a while, and eventually returns the error "Error Fetching http headers". What exactly is this supposed to mean and how

2021-06-23 03:22:11    分类:问答    .net   php   wcf   wshttpbinding

Why InstanceContextMode.PerSession behave like PerCall when using wsHttpBinding?

I have WCF service consumed by AJAX client using SOAP 1.2 Web.config: <endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" bindingConfiguration="wsHttpBin"> <wsHttpBinding> <binding name="wsHttpBin"> <security mode="None"/> </binding> </wsHttpBinding> From what I have read, I have to use <security mode="None"/> since a service exposed with “wsHttpBinding” binding implements WS-Security of WS-* family of web service specifications. As the binding uses security, the request will be rejected since AJAX doesn't support the security context. My WCF service behavior is

2021-06-14 10:29:32    分类:问答    ajax   wcf   soap   wshttpbinding   wcf-sessions

WCF error The client certificate is not provided. Specify a client certificate in ClientCredentials

I am trying to call a WCF service .I created a selfsigned certificate and installed in my localmachine \personnal \certificates , and also I added that in my section .But I don't understand why this error is . Here is my web.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="wsHttpEndpoint"> <security mode="Transport"> <transport clientCredentialType="Certificate" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="https://abcdxyz.abc.syntax.com/TestCCService.svc" binding="wsHttpBinding"

2021-06-13 16:42:03    分类:问答    wcf   wshttpbinding

wshttpbinding is only for .net clients?

Is the wsHttpBinding only for .NET clients? Because in wsHttpBinding default security is enabled, so data transferred with encryption. So how can non-.NET clients (like java or php) consume such WCF services?

2021-06-11 21:11:16    分类:问答    java   wcf   wshttpbinding