ContractFilter mismatch at the EndpointDispatcher exception

A “ContractFilter mismatch at the EndpointDispatcher” means the receiver could not process the message because it did not match any of the contracts the receiver has configured for the endpoint which received the message. This can be because: You have different contracts between client and sender. You’re using a different binding between client and sender. … Read more

What replaces WCF in .Net Core?

You can use gRPC for hosting web services inside .NET core application. Introduction gRPC is a high performance, open source RPC framework initially developed by Google. The framework is based on a client-server model of remote procedure calls. A client application can directly call methods on a server application as if it was a local … Read more

Could not find an implementation of the query pattern

Is the tblPersoon implementing IEnumerable<T>? You may need to do it using: var query = (from p in tblPersoon.Cast<Person>() select p).Single(); This kind of error (Could not find an implementation of the query pattern) usually occurs when: You are missing LINQ namespace usage (using System.Linq) Type you are querying does not implement IEnumerable<T> Edit: Apart … Read more

How can I ignore a property when serializing using the DataContractSerializer?

Additionally, DataContractSerializer will serialize items marked as [Serializable] and will also serialize unmarked types in .NET 3.5 SP1 and later, to allow support for serializing anonymous types. So, it depends on how you’ve decorated your class as to how to keep a member from serializing: If you used [DataContract], then remove the [DataMember] for the … Read more

Increasing the timeout value in a WCF service

Are you referring to the server side or the client side? For a client, you would want to adjust the sendTimeout attribute of a binding element. For a service, you would want to adjust the receiveTimeout attribute of a binding elemnent. <system.serviceModel> <bindings> <netTcpBinding> <binding name=”longTimeoutBinding” receiveTimeout=”00:10:00″ sendTimeout=”00:10:00″> <security mode=”None”/> </binding> </netTcpBinding> </bindings> <services> <service … Read more

How to solve “Could not establish trust relationship for the SSL/TLS secure channel with authority”

As a workaround you could add a handler to the ServicePointManager‘s ServerCertificateValidationCallback on the client side: System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => { return true; }; but be aware that this is not a good practice as it completely ignores the server certificate and tells the service point manager that whatever certificate is fine … Read more

How to turn on WCF tracing?

The following configuration taken from MSDN can be applied to enable tracing on your WCF service. <configuration> <system.diagnostics> <sources> <source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true” > <listeners> <add name=”xml”/> </listeners> </source> <source name=”System.ServiceModel.MessageLogging”> <listeners> <add name=”xml”/> </listeners> </source> <source name=”myUserTraceSource” switchValue=”Information, ActivityTracing”> <listeners> <add name=”xml”/> </listeners> </source> </sources> <sharedListeners> <add name=”xml” type=”System.Diagnostics.XmlWriterTraceListener” initializeData=”Error.svclog” /> </sharedListeners> </system.diagnostics> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)