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
158
votes
15 answers

(413) Request Entity Too Large | uploadReadAheadSize

I've written a WCF service with .NET 4.0, which is hosted on my Windows 7 x64 Ultimate system with IIS 7.5. One of the service methods has an 'object' as argument and I'm trying to send a byte[] which contains a picture. As long as the file size of…
kipusoep
  • 2,174
  • 6
  • 24
  • 34
150
votes
19 answers

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

I have a WCF service hosted in IIS 7 using HTTPS. When I browse to this site in Internet Explorer, it works like a charm, this is because I have added the certificate to the local root certificate authority store. I'm developing on 1 machine, so…
JL.
  • 78,954
  • 126
  • 311
  • 459
147
votes
4 answers

How to retrieve the LoaderException property?

I get a error message while updating my service reference: Custom tool warning: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. How can I retrieve the LoaderException property? Update:…
rozon
  • 2,518
  • 4
  • 23
  • 37
146
votes
5 answers

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

I am using .NET 3.5SP1 and DataContractSerializer to serialize a class. In SP1, they changed the behavior so that you don't have to include DataContract/DataMember attributes on the class and it will just serialize the entire thing. This is the…
NotDan
  • 31,709
  • 36
  • 116
  • 156
140
votes
14 answers

What replaces WCF in .Net Core?

I am used to creating a .Net Framework console application and exposing a Add(int x, int y) function via a WCF service from scratch with Class Library (.Net Framework). I then use the console application to proxy call this function within the…
Sigex
  • 2,834
  • 2
  • 24
  • 25
140
votes
5 answers

Increasing the timeout value in a WCF service

How do I increase the default timeout to larger than 1 minute on a WCF service?
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
138
votes
5 answers

Difference between web reference and service reference?

What is the difference between web reference and service reference in WCF? Which is preferable in WCF?
Nirmal
137
votes
10 answers

Could not find an implementation of the query pattern

In my silverlight application I am trying to create a database connection using LINQ. First I add a new LINQ to SQL class, and drag my table called "tblPersoon" into it. Then in my service file I try to execute the following…
Schoof
  • 2,715
  • 5
  • 29
  • 41
130
votes
27 answers

ContractFilter mismatch at the EndpointDispatcher exception

I have the following scenario that I'm trying to test for: A common WSDL WCF endpoint that implements objects based on the WSDL and is hosted in IIS. A client app that uses a proxy based off the WSDL to create requests. When I make a web service…
laconicdev
  • 6,360
  • 11
  • 63
  • 89
128
votes
6 answers

Can we create custom HTTP Status codes?

I have a REST and WCF service and want to send a custom status code based on the operation. For example when some validation fails then I want to send HTTP 444 and when authorization fails I want to send HTTP 455 The question is how do we have it…
Rajesh
  • 7,766
  • 5
  • 22
  • 35
126
votes
4 answers

Decompressing GZip Stream from HTTPClient Response

I am trying to connect to an api, that returns GZip encoded JSON, from a WCF service (WCF service to WCF service). I am using the HTTPClient to connect to the API and have been able to return the JSON object as a string. However I need to be able to…
Corey
  • 1,733
  • 4
  • 18
  • 26
122
votes
32 answers

Error 5 : Access Denied when starting windows service

I'm getting this error when I try to start a windows service I've created in C#: My Code so far: private ServiceHost host = null; public RightAccessHost() { InitializeComponent(); } protected override void OnStart(string[] args) { host =…
TheBoubou
  • 19,487
  • 54
  • 148
  • 236
121
votes
7 answers

MemoryCache Thread Safety, Is Locking Necessary?

For starters let me just throw it out there that I know the code below is not thread safe (correction: might be). What I am struggling with is finding an implementation that is and one that I can actually get to fail under test. I am refactoring a…
James Legan
  • 1,903
  • 2
  • 14
  • 21
120
votes
2 answers

What is the difference between a WCF Service Application and a WCF Service Library?

I am developing a WCF web service and I used the WCF Service Application template to do that. Does creating a "WCF Service Application" fulfill this requirement? What are the advantage of creating a WCF Service Library over a WCF Service…
Ashish Ashu
  • 14,169
  • 37
  • 86
  • 117
119
votes
3 answers

CORS - How do 'preflight' an httprequest?

I am trying to make a cross domain HTTP request to WCF service (that I own). I have read several techniques for working with the cross domain scripting limitations. Because my service must accommodate both GET and POST requests I cannot implement…
Nick
  • 19,198
  • 51
  • 185
  • 312