wcf-binding

Sending object to WCF service. MaxStringContentLength (8192 bytes) exceeded when deserializing

跟風遠走 提交于 2019-12-02 04:07:32
I created a simple WCF web service that has one method: SubmitTicket(flightticket ft, string username, string password) On the client side, I have an application for filling out a form (a flight ticket) and sending it to this newly created web service. When this flightticket object exceeds 8192bytes I get the following error: "There was an error deserializing the object of type flightticket. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object

How to consume WCF wsHttpBinding Service in application built in 2.0?

孤者浪人 提交于 2019-12-02 01:09:40
WCF service is running with 'wsHttpBinding' Binding. The application which gonna consume WCF Service is non-wcf compliance or in other words, it is on the top of Framework 2.0 and I can't use ServiceModel in this app (since only 3.5 supports ServiceModel). Any suggestions, how to consume above WCF Service in application built in 2.0? This won't work - typically. .NET 2.0 only support basicHttpBinding, or the new REST-style webHttpBinding . You could potentially retrofit the WSE (Web Services Enhancements) - but that gets quite messy. ServiceModel is part of 3.0, not 3.5 - but either way I

Why WCF InstanceContextMode.PerSession is not working over https?

佐手、 提交于 2019-12-01 13:20:49
I have problems with [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession )] I have simple wcf service, which is hosted in IIS 7. Service code: [ServiceContract(SessionMode = SessionMode.Allowed)] public interface IService1 { [OperationContract] int SetMyValue(int val); [OperationContract] int GetMyValue(); } [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession )] public class Service1 : IService1 { int MyValue = 0; public int SetMyValue(int val) { MyValue = val; return MyValue; } public int GetMyValue() { return MyValue; } } Everything works if service site

How to detect binding from wcf service end

一世执手 提交于 2019-12-01 11:52:33
suppose i have one wcf service with multiple endpoint having different type of binding like tcp, basichttp, wshttp etc. <endpoint address ="" binding="wsHttpBinding" contract="NorthwindServices.ServiceContracts.ICustomerService" bindingNamespace = "http://dotnetmentors.com/services/customer" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <endpoint address ="" binding ="netNamedPipeBinding" contract ="NorthwindServices.ServiceContracts.ICustomerService" bindingNamespace = "http://dotnetmentors.com/services/customer" /> <endpoint address="mex" binding=

Why WCF InstanceContextMode.PerSession is not working over https?

半世苍凉 提交于 2019-12-01 11:38:49
问题 I have problems with [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession )] I have simple wcf service, which is hosted in IIS 7. Service code: [ServiceContract(SessionMode = SessionMode.Allowed)] public interface IService1 { [OperationContract] int SetMyValue(int val); [OperationContract] int GetMyValue(); } [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession )] public class Service1 : IService1 { int MyValue = 0; public int SetMyValue(int val) { MyValue =

Hosting Multiple TCP WCF service Endpoints on single Port

跟風遠走 提交于 2019-12-01 10:40:26
I am hosting 3 WCF services inside windows services.Each WCF service contains Multiple endpoints. Right now, i am host all my endpoints thru TCP binding on different ports. Is there any way to host all these end points from different wcf services on same port? JohnC Sure is! You can use the Net.TCP Port Sharing service. Net.TCP Port Sharing on MSDN I just looked into that, out of curiosity. The behavior I discovered seems so strange that I almost don't want to put it here. But it worked in my case, so maybe it's doing the same for you: I am getting the AddressAlreadyInUseException when I'm

How to detect binding from wcf service end

吃可爱长大的小学妹 提交于 2019-12-01 10:36:46
问题 suppose i have one wcf service with multiple endpoint having different type of binding like tcp, basichttp, wshttp etc. <endpoint address ="" binding="wsHttpBinding" contract="NorthwindServices.ServiceContracts.ICustomerService" bindingNamespace = "http://dotnetmentors.com/services/customer" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <endpoint address ="" binding ="netNamedPipeBinding" contract ="NorthwindServices.ServiceContracts.ICustomerService"

WCF NetTCP Binding Over Internet

梦想的初衷 提交于 2019-12-01 04:26:00
I have a question. I would like to serve a series of services made with WCF. The client that consumes the services is also .NET with WCF. I would like to have high speed of access, fast response, transport medium to small Data Contracts (primary .net basic data types). The distribution will be over internet, I´m looking for reliability, availability and basic security. I don´t want to use WsHttp, because my only client is based on .net and I will have almost 150 clients requesting the services. What do you suggest to use for binding? Are there any disadvantages, risks, etc? Thanks in advance!

WCF NetTCP Binding Over Internet

谁说胖子不能爱 提交于 2019-12-01 01:12:13
问题 I have a question. I would like to serve a series of services made with WCF. The client that consumes the services is also .NET with WCF. I would like to have high speed of access, fast response, transport medium to small Data Contracts (primary .net basic data types). The distribution will be over internet, I´m looking for reliability, availability and basic security. I don´t want to use WsHttp, because my only client is based on .net and I will have almost 150 clients requesting the

Error 400 (bad request): maxReceivedMessageSize not taken into account for my WCF service

自作多情 提交于 2019-12-01 01:06:22
There are multiple related questions on SO (almost same title), none of them helped me to fix my problem. Please do not close my question as duplicate before reading it. Thanks. I'm currently using WCF to expose a webservice (SOAP, HTTP). It is deployed in IIS Express for now. My problem is, I can't manage to consume my service from my client. My client receives a HTTP Error 400 Bad request exception. I've then activated tracing on server side to see what's actually happening, here's what I get: I've translated the error message into English: The maximum message size quota for incoming