wcf-binding

WCF REST Service Template 4.0 “Bad Request”

一笑奈何 提交于 2019-12-13 21:26:08
问题 I am trying to send a large json string to a WCF Service created with the WCF REST Service Template. If the string is longer 8000 characters I get a "HTTP/1.1 400 Bad Request" error. I have tried added this to my web config: <bindings> <webHttpBinding> <binding name="httpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"/> </webHttpBinding> </bindings> Any ideas? 回答1: You must also setup readerQuotas if you want to pass large strings: <bindings> <webHttpBinding>

Connection interrupted when using WebHttpBinding in Transport SecurityMode

给你一囗甜甜゛ 提交于 2019-12-13 06:32:19
问题 I want to expose an implementation of a contract over a WebHttpBinding with SecurityMode: transport (SSL). However, when I try to access the site via Firefox, I only get The connection to localhost was interrupted while the page was loading. The config file is as follows: <configuration> <system.serviceModel> <services> <service name="MyService"> <endpoint address="https://localhost" binding="webHttpBinding" contract="MyService" bindingConfiguration="secureWebHttp"> </endpoint> </service> <

Trouble Consuming Java Web Service with .NET Client

故事扮演 提交于 2019-12-13 06:06:23
问题 WCF newbie here, I am attempting to make a .NET 4.0 client consume a web service hosted in JBOSS. I believe the results from the web service are being serialized using x-fire. The client side is using WCF to connect to the service. This in an internal web service that uses Ntlm to authenticate the caller. I am able to add a service reference to my client, and call one of the methods on the server. I have determined that the request is being sent, and a response is indeed coming back. The

Consuming a WCF Service in Mono?

痴心易碎 提交于 2019-12-13 05:42:13
问题 I am trying to consume a WCF Webservice on Mono using the proxy but I am getting the following exception: System.NotImplementedException: The requested feature is not implemented. at System.ServiceModel.Configuration.WSHttpBindingElement.OnApplyConfiguration (System.ServiceModel.Channels.Binding binding) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/WSHttpBindingElement.cs:101 at System.ServiceModel.Configuration

WCF Authentication NT Challenge response

假装没事ソ 提交于 2019-12-13 05:40:02
问题 How can I get my console app to connect with an IIS hosted WCF service when basic and/or windows authentication is switched on and anonymous authentication turned off? The site is internal and stringent security is not required. There is no domain controller. However, I need to turn off anonymous access. I have searched for days and have tried many methods including using a self hosted certificate and overriding the certification validation, overriding the UserNameValidator and using client

Custom binding c# WCF

混江龙づ霸主 提交于 2019-12-13 05:18:01
问题 I would like to add a security header to my WCF SOAP message that looks like the following: <s:Header> <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">URLWithAction</Action> <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:Username>Username</wsse:Username> <wsse:Password Type=

datacontract attribute is required in WCF?

二次信任 提交于 2019-12-13 04:45:47
问题 is in WCF DataContract attribute is required? I have a class that class is not marked with DataContract or property with DataMember. When i deploy wcf service on 4 server, out 4 service works fine on 3 server and failed on 1 server with message "Type 'Class' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute." So is there any settings in web.config or machine.config or in

“The underlying connection was closed: A connection that was expected to be kept alive was closed by the server” when calling SOAP

房东的猫 提交于 2019-12-13 04:41:58
问题 I sometimes got error "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server" when calling another WSDL service. I use .Net 4.5 WCF service, My application connect to external 3rd party SOAP-WSDL service to perform actions. most of calls to this service done successfully, but there is one specific call, 5% of that calls are failed with that error The underlying connection was closed: A connection that was expected to be kept alive was

InstanceContextMode.PerSession not working

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 03:54:51
问题 I m using InstanceContextMode.PerSession in wshttpbinding as mentioned in below code but it seems not working,since my count is not increasing. Please advice. [ServiceContract(SessionMode = SessionMode.Required)] public interface ITransService { [OperationContract(IsInitiating=true)] int Insert(int userId); [TransactionFlow(TransactionFlowOption.Allowed)] [OperationContract] int Update(); // TODO: Add your service operations here } [ServiceBehavior(InstanceContextMode = InstanceContextMode

Programically get the system name of named pipe

血红的双手。 提交于 2019-12-12 16:20:36
问题 I am writing a inter-process comunication using WCF NetNamedPipeBinding. My goal is to have service running at "net.pipe://localhost/service", so I running the simplest host: host = new ServiceHost(contract, new Uri[] { "net.pipe://localhost" }); host.AddServiceEndpoint(typeof (IContract), new NetNamedPipeBinding(), "service"); host.Open(); According to http://blogs.msdn.com/b/rodneyviana/archive/2011/03/22/named-pipes-in-wcf-are-named-but-not-by-you-and-how-to-find-the-actual-windows-object