wcf-binding

C# WCF: WCF Service returning a (404) Bad Request when sending an array of items

风流意气都作罢 提交于 2019-12-19 09:45:24
问题 I am trying to send an array of about 50 elements to a WCF service method, but I'm always receiving a (404) Bad Request error. I think that it has to do with the message size or something like that, because if I send an empty array it works. I did some research and added some stuff in the web.config of the WCF but I still can't manage to get this to work. Can anyone please provide some additional information as to how I can maybe increase the size of the message I can send ? [UPDATE] Solution

Cannot find a token authenticator for the 'System.IdentityModel.Tokens.UserNameSecurityToken' token type.

橙三吉。 提交于 2019-12-19 04:08:31
问题 I am trying to get a third party Java client to communicate with a WCF service I have written. I get the following exception when receiving the message: Cannot find a token authenticator for the 'System.IdentityModel.Tokens.UserNameSecurityToken' token type. Tokens of that type cannot be accepted according to current security settings. Here is my configuration: Binding <customBinding> <binding name="TestSecureBinding"> <security authenticationMode="MutualCertificate" /> <textMessageEncoding

How to choose a WCF binding?

落花浮王杯 提交于 2019-12-19 03:09:34
问题 WCF binding chooser algorithm I have watched a speak at a TechEd conference that showed a simple algorithm for choosing a WCF binding. I can't find this algorithm but I remember some of the main ideas: If your WCF service will have non-.NET clients choose Http Soap If your WCF will have .NET clients in other machines choose Net Tcp If your WCF will have .NET clients in the same machine choose Message Queue Can anyone provide a link to the full version of this algorithm? 回答1: Something like

Dynamically set endpoint address in wcf client (with net tcp binding)

本小妞迷上赌 提交于 2019-12-18 17:37:31
问题 So I'm not overly familiar with WCF and all the stuff I've googled hasn't helped me with how to achieve what I need. Sorry if this is a dumb question :) Basically there is a server app with services exposed with WCF (net tcp binding). I've written a new console app and I need to call the service. So I can achieve this by adding a dll for the proxy project we have and by adding a bunch of config files (such as WCFClientBindings, WCFClientEndPoints). If I use a defined end point then I can call

bindingConfiguration vs bindingName

。_饼干妹妹 提交于 2019-12-18 14:37:13
问题 What exactly is the difference between bindingConfiguration and bindingName elements in a WCF endpoint element? The reason that I ask is I am creating an endpoint which uses basicHttpBinding and SSL. I configured the web.config like this: <basicHttpBinding> <binding name="basicHttps"> <security mode="Transport"> <transport clientCredentialType="None"/> </security> </binding> <endpoint binding="basicHttpBinding" bindingConfiguration="basicHttps" contract="Hsp.Services.Interface.Catalog

Error “This message cannot support the operation because it has been read”

眉间皱痕 提交于 2019-12-18 12:16:15
问题 I have the same problem that is listed in the following thread. WSDL first WCF server where client does not send SOAPAction I performed the steps that are listed in the same thread (also shown below) 1) Download the Microsoft WCF examples. Add the following files to your project from WF_WCF_Samples\WCF\Extensibility\Interop\RouteByBody\CS\service DispatchByBodyOperationSelector.cs DispatchByBodyBehaviorAttribute.cs 2) Add the following attributes to your interface (next to your

Does WCF always use SOAP to send information over your binding?

不问归期 提交于 2019-12-18 11:33:28
问题 I understand you can choose from a range of bindings, such as TCP, HTTP, HTTPS etc. Am I correct in thinking it always uses SOAP to send data over this connection? I am watching a guide to WCF and it is talking about how exceptions are serialized into SOAP and sent to the client. I would have thought that not all bindings would use SOAP to send data, so I am a bit confused about how it works. Although I understand the fundamentals of WCF, how to set up services and use a proxy on the client,

What is the maximum size that maxReceivedMessageSize can be set to for a NetNamedPipeBinding?

房东的猫 提交于 2019-12-18 10:39:30
问题 I noticed that 2147483647 seems to be a popular choice for maxReceivedMessageSize but is this the limit? 回答1: Nope, the limit is Int64.MaxValue 1 which is: 9223372036854775807 回答2: MaxMessageReceivedSize in basicHttpBinding appears to be an int32 - setting it over the max value of an int32 results in: This factory buffers messages, so the message sizes must be in the range of an integer value. Parameter name: bindingElement.MaxReceivedMessageSize 回答3: MaxReceivedMessageSize and MaxBufferSize

Is it possible to determine a WCF binding configuration from the SOAP envelope?

巧了我就是萌 提交于 2019-12-18 08:58:24
问题 I've generated a WCF client service proxy from a WSDL file, which calls a third-party java web service. Now I need to configure the binding and proxy to call a web method. However, I only have the below SOAP information, a username and password, and a client certificate. How can I work out what I need to do? Are there any "reverse this to configuration" apps, or websites that teach the skills required? I think I am after, "this part of the message, translates to this configuration". Can

Maximum request length exceeded in WCF

旧巷老猫 提交于 2019-12-18 06:59:35
问题 I am currently using Wcf application and getting above mentiooned error in Trace Log. Below is the Web.Config for Wcf Service. <bindings> <wsHttpBinding> <binding name="NewBinding0" closeTimeout="00:50:00" openTimeout="00:50:00" sendTimeout="00:50:00" receiveTimeout="00:50:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount=