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
97
votes
13 answers

HTTP 404 when accessing .svc file in IIS

I recently created a WCF service that works fine when tested from Visual Studio 2008. but when I deploy the project to IIS and I try to access the .svc file from IIS, I get this error : "Server Error in '/' Application.The resource cannot be found. …
Attilah
  • 17,632
  • 38
  • 139
  • 202
96
votes
4 answers

WCF named pipe minimal example

I'm looking for minimal example of WCF Named Pipes (I expect two minimal applications, server and client, which can communicate via a named pipe.) Microsoft has the briliant article Getting Started Tutorial that describes WCF via HTTP, and I'm…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
96
votes
6 answers

Why should a developer use web services instead of direct connections to a db?

I'm looking for a "top ten" list of reasons why we should be connecting to remote databases via web service instead of directly connecting to the db. This is an internal debate right now and I'm pro-web service but losing the argument. I have a…
DenaliHardtail
  • 27,362
  • 56
  • 154
  • 233
96
votes
5 answers

Is .NET Remoting really deprecated?

Everyone is saying how .NET Remoting is being replaced by WCF, but I'm wondering just how accurate that is. I haven't seen any official word that Remoting is being deprecated, and it seems to me there are certainly scenarios where Remoting makes…
Mark
  • 11,257
  • 11
  • 61
  • 97
95
votes
4 answers

What 'appid' should I use with netsh.exe?

The netsh command wants an appid (see here): netsh http add sslcert ipport=0.0.0.0:8000 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF} How am I supposed to know the GUID netsh wants me to provide?
Brann
  • 31,689
  • 32
  • 113
  • 162
94
votes
11 answers

WCF timeout exception detailed investigation

We have an application that has a WCF service (*.svc) running on IIS7 and various clients querying the service. The server is running Win 2008 Server. The clients are running either Windows 2008 Server or Windows 2003 server. I am getting the…
Jason Kealey
  • 7,988
  • 11
  • 42
  • 55
94
votes
17 answers

Service has zero application (non-infrastructure) endpoints

I recently created a WCF service (dll) and a service host (exe). I know my WCF service is working correctly since I am able to successfully add the service to WcfTestClient. However, I seem to be running into an issue when I comes to utlizing my…
user280626
  • 971
  • 1
  • 7
  • 5
93
votes
4 answers

WCF vs ASP .Net Web API

What are the pros and cons of using each technology? WCF Web Api is now merged into Asp.net Asp.net web api now supports self hosting. I still imagine if I want to expose multiple protocol schemas for the same operation I would still lean towards…
Alwyn
  • 8,079
  • 12
  • 59
  • 107
93
votes
4 answers

What are the WCF Service Reference .datasource files?

What are the .datasource files that are automatically generated by "Create Service Reference" in Visual Studio? The comment in the file is this: This file is automatically generated by Visual Studio .Net. It is used to store generic object…
Andy White
  • 86,444
  • 48
  • 176
  • 211
92
votes
24 answers

This could be due to the service endpoint binding not using the HTTP protocol

I have a WCF Service running fine on my local machine. I put it on the servers, and I am receiving the following error: An error occurred while receiving the HTTP response to http://xx.xx.x.xx:8200/Services/WCFClient.svc. This could be due to…
Matt Schubert
  • 1,003
  • 1
  • 10
  • 12
91
votes
7 answers

How can I return a custom HTTP status code from a WCF REST method?

If something goes wrong in a WCF REST call, such as the requested resource is not found, how can I play with the HTTP response code (setting it to something like HTTP 404, for example) in my OperationContract method?
kgriffs
  • 4,080
  • 5
  • 37
  • 42
90
votes
20 answers

No connection could be made because the target machine actively refused it 127.0.0.1:3446

I'm using the WCF4.0 template -REST. I'm trying to make a method that uploads a file using a stream. The problem always occur at Stream serverStream = request.GetRequestStream(); Class for streaming: namespace LogicClass { public class…
fiberOptics
  • 6,955
  • 25
  • 70
  • 105
90
votes
7 answers

WCF Configuration without a config file

Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how…
Kilhoffer
  • 32,375
  • 22
  • 97
  • 124
89
votes
7 answers

How do I get the XML SOAP request of an WCF Web service request?

I'm calling this web service within code and I would like to see the XML, but I can't find a property that exposes it.
Diskdrive
  • 18,107
  • 27
  • 101
  • 167
89
votes
8 answers

The maximum message size quota for incoming messages (65536) has been exceeded

I get this exception while creating scope for few tables all those tables are huge in design
Onkar
  • 891
  • 1
  • 6
  • 4