Questions tagged [wcf]

Windows Communication Foundation is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications.

According to the Microsoft Developer Center:

Windows Communication Foundation (WCF) is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications that communicate across the web and the enterprise.

WCF Resources

WCF is a tool often used to implement and deploy a service-oriented architecture (SOA). It is designed using service-oriented architecture principles to support distributed computing where services have remote consumers. Clients can consume multiple services; services can be consumed by multiple clients. Services are loosely coupled to each other. Services typically have a WSDL interface (Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as WS-Addressing, WS-ReliableMessaging and WS-Security. With the release of .NET Framework 4.0, WCF also provides RSS Syndication Services, WS-Discovery, routing and better support for REST services.

The Windows Communication Foundation (or WCF), previously known as "Indigo", is a runtime and a set of APIs in the .NET Framework for building connected, service-oriented applications.

Endpoints

A WCF client connects to WCF service via an endpoint. Each service exposes its contract via one or more endpoints. An endpoint has an address (which is a URL specifying where the endpoint can be accessed) and binding properties that specify how the data will be transferred.

WCF Features

  • Create and consume traditional SOAP-based web services
  • Create and consume services that use the international WS-* standards
  • Create and consume services using other transports:
    • TCP/IP with binary instead of text-based XML
    • Named Pipes
    • Microsoft Message Queue (MSMQ)
  • Host a WCF Service in any application, not just in IIS
  • Host a service in IIS with any transport, not just HTTP/HTTPS
  • Create services based on Windows Workflow Foundation workflows

Important WCF Questions on Stack Overflow

50818 questions
11
votes
2 answers

Can the data contract serializer used for any third party webservice

I have a large third party webservice; the reference.cs is 33 Mbyte. Using Visual Studio 2017, the proxy uses the XML Serializer, which causes a 5 second delay when creating the channel. I opened a case at Microsoft, and they showed me partially how…
NickD
  • 2,672
  • 7
  • 37
  • 58
11
votes
1 answer

Why doesn't wsHttpBinding support streaming?

Why doesn't wsHttpBinding support streaming? EDIT: To test my comment about netTcpBinding, I tried following code, which gives runtime error:
morpheus
  • 18,676
  • 24
  • 96
  • 159
11
votes
5 answers

Good C#.NET Solution to manage frequent database polling

I am currently working on a c# .NET desktop application that will be communicating to a database over the internet via WCF and WCF Data Services. There will be many spots in the application that may need to be refreshed upon some interval. The…
BernicusMaximus
  • 250
  • 2
  • 13
11
votes
3 answers

How to deserialize a WCF soap response message from a file with DataContractSerializer?

When I call a web service operation, WCF deserializes the message to the proxy class with the DataContractSerializer: why couldn't I do the same ? Here is the soap message in the file ActLoginResponse.xml:
Anthony Brenelière
  • 60,646
  • 14
  • 46
  • 58
11
votes
1 answer

Configuring the .NET WCF UTF-8 deserializer to modify/discard non-shortest form chars instead of throwing an exception?

We have a SOAP web service hosted via WCF. One of the clients we receive data from occasionally encodes UTF-8 using non-shortest form (See http://www.unicode.org/versions/corrigendum1.html for a bit of info on this). It's not easy to modify the…
Redwood
  • 66,744
  • 41
  • 126
  • 187
11
votes
1 answer

Serializable and DataContract (not versus?)

I am reading some code in my new project and found out the ex-developer was using Serializable and DataContract together. [Serializable] and [DataContract(Namespace="Some.Name.Space", IsReference = true)] I assume WCF will ignore Serializable…
tonyjy
  • 1,359
  • 3
  • 12
  • 24
11
votes
2 answers

AddServiceEndpoint throws key is null?

When using the ServiceHost.AddServiceEndpoint to add the custom ProtoEndpointBehavior I get the following exception : System.ArgumentNullException: Value cannot be null. Parameter name: key at…
Banshee
  • 15,376
  • 38
  • 128
  • 219
11
votes
1 answer

How to force a net.tcp mex endpoint (mexTcpBinding) to participate in port sharing?

I have a WCF service which is hosted as a Windows Service. We would like to enable a mex endpoint at the same address (but with a '/mex' suffix). I have been trying to do this (unsuccessfully) using the following…
Damian Powell
  • 8,655
  • 7
  • 48
  • 58
11
votes
3 answers

C# - Make WCF Accept any Soap message prefixes

This is the situation, there is an existing client, I need to build a server the client will be consuming. I don't own the client and am in no position to change it. The client soap message can be follows How do I make my service accept both of the…
Shadrack Orina
  • 7,713
  • 2
  • 31
  • 36
11
votes
1 answer

Minimum OS Permissions required to create named pipe (WCF)

I have an exe that runs under the context of the logged-in user. The exe uses WCF to make itself a named pipe server (it will be called by multiple clients). Does the user need a specific permission for the exe to be able to create the named pipe?…
Paul Nearney
  • 6,965
  • 2
  • 30
  • 37
11
votes
2 answers

What is going on with customUserNamePasswordValidatorType?

I have been creating a custom username/password validator for a WCF service and ran across the configuration item customUserNamePasswordValidatorType. I've been able to make my code work by following examples, but I just don't understand what is…
Jacob
  • 1,285
  • 2
  • 11
  • 27
11
votes
0 answers

MODULE_SET_RESPONSE_ERROR_STATUS Warning On my IIS Server Failed Trace Log

I created Web service with multiple endpoints. And I hosted that in my public iis server. My client trying to hit my end points, Except One endpoint rest of the end point are working fine. I can hit that particular endpoint with soap UI. But I…
Anbu
  • 111
  • 2
  • 4
11
votes
2 answers

Remove Action Node mustUnderstand from WCF soap request using IClientMessageInspector

I am hitting a WCF service using a WSDL I don't have access to and cannot modify. For one of the requests the remote service is dying because we are sending the: Having searched extensively I cannot find a simple…
TheEdge
  • 9,291
  • 15
  • 67
  • 135
11
votes
4 answers

WCF service returns 404 over https but not http

I'm migrating an existing service from HTTP (Dev/UAT) to HTTPS (Production), and I'm having trouble with the configuration. Here is the system.serviceModel section of my web.config:
Matt Mills
  • 8,692
  • 6
  • 40
  • 64
11
votes
3 answers

IMetaDataExchange could not be found in the list of contracts implemented by the service

I have searched the web for resolution of this error, but everything I have found suggests what I have is correct. Maybe someone could take a look and spot an obvious mistake I just cannot see. I have a windows service, hosting two…
jimplode
  • 3,474
  • 3
  • 24
  • 42