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

WCF service reference generates void methods from WSDL

This is my first try trying to use WCF, so I'm guessing I'm doing something incorrect. I'm trying to access a soap service defined by the WSDL at http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1?wsdl I'm using VS2010, and I add a…
StarKat99
  • 531
  • 3
  • 15
11
votes
1 answer

Async call to WCF client blocks subsequent synchronous calls

I'm seeing a problem with WCF when calling the generated Async methods on the client... If I await on an async method, and then subsequently call a non-async method on the same client, the blocking method never returns. Here's a trivial reproduction…
Mark
  • 1,784
  • 16
  • 26
11
votes
3 answers

How do I compile a WCF Service Library in 32-bit mode?

I can reference Matlab code from a x86 based project, but not from an x64 project. I can build the WCF Service as "Any CPU", but not x86. When I attempt to build as x86 only, it gives the following error: ---start…
Contango
  • 76,540
  • 58
  • 260
  • 305
11
votes
2 answers

WCF maxConnections property

I have a WCF service written in .net 4, and exposed over net.tcp. Any time I try to set the MaxConnections property of the binding configuration to something higher than 10 I am AddressAlreadyInUseException. Why would that be getting thrown on the…
user60456
11
votes
4 answers

WCF SslStreamSecurity DNS Identity Check failing for just 4.6 framework

I am working on developing a new binding for a Wcf service that is hosted in IIS, I thought I got everything working, but it turns out that the client only works when it is targetting .Net framework 4.5, if I change it to target 4.6 then I get the…
BrandonAGr
  • 5,827
  • 5
  • 47
  • 72
11
votes
2 answers

Using Ninject WCF Extension with WCF Web Service

I have a WCF web service in which I want to use my Repositories and Services which I wish to dependency inject into my WCF web service, however the Ninject WCF Extension example pretty much has a ctor which is instantiating an instance of each…
Tom Bell
  • 1,120
  • 2
  • 16
  • 33
11
votes
2 answers

Error: The type or namespace name 'ApplicationUser' could not be found in Visual Studio 2013

I am following the "RESTful WCF Service" tutorial. But when I built my application I get this error: The type or namespace name 'ApplicationUser' could not be found (are you missing a using directive or an assembly reference?) …
BDeveloper
  • 1,175
  • 6
  • 24
  • 44
11
votes
3 answers

WCF client-side error-handling

I'm consuming a clunky WCF server that occasionally throws various exceptions, and additionally returns some of its errors as string. I have no access to the server code at all. I want to override the inner WCF-client request invocation method and…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
11
votes
3 answers

Hosting WCF soap and rest endpoints side by side

I have written a service that I would like expose both via rest and soap. Everything I read about WCF 4.0 says that I just need to expose 2 endpoints with differing behaviors to do this. But I cannot get it to work. Here is my service…
Troy
  • 381
  • 1
  • 4
  • 16
11
votes
6 answers

Response for preflight has invalid HTTP status code 405

I have read many similar problems in StackOverflow, but the solutions doesn't work for me. I have WCF REST service: [] [
ceth
  • 44,198
  • 62
  • 180
  • 289
11
votes
2 answers

Does WCF support Multi-threading itself?

I developed a proof of concept application that query if WCF support multi-threading. Now, all what I did is creating a service contract marked with [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, …
Sabri Ghaith
  • 149
  • 1
  • 1
  • 6
11
votes
3 answers

Oracle Data Provider for .NET: Connection request timed out

We have a C# WCF web service hosted on Windows 2008 SP2/IIS 7 accessing an Oracle database. Usually data access works fine but during load testing, it often times out and logs and exception saying: Error occurred when processing XXXXXXXX Web…
DjD
  • 191
  • 2
  • 2
  • 7
11
votes
5 answers

The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' could not be loaded

I created a WCF Service using dotNet 4.5. The database layer is built with Entity Framework 6. I hosted the service with IIS 8. It is working fine. Now I need to consume the service with windows forms client, that is built using dotnet framework…
Ali Sakhi
  • 195
  • 1
  • 1
  • 9
11
votes
3 answers

WCF Restful returning HttpResponseMessage wants to negotiate when setting content

I have a WCF Restful service and I would like the methods to return HttpResponseMessage because it seems structured rather than just returning the data or the exception or whatever else might make its way there. I am assuming this is a correct, if…
Matt
  • 25,943
  • 66
  • 198
  • 303
11
votes
3 answers

How to trace WCF message size?

I'm fooling around with WCF, and would like to see how many messages I send/receive, and how large these messages are. I tried activated WCF tracing, and ended up with a real huge trace file, but I found no way to extract the simple message size…
Sam
  • 28,421
  • 49
  • 167
  • 247