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
114
votes
4 answers

System.ServiceModel not found in .NET Core project

I have a .NET Core xUnit project. I'm trying to call a WCF service from it but get the following exception: System.InvalidOperationException occurred HResult=0x80131509 Message=An error occurred while loading attribute…
BanksySan
  • 27,362
  • 33
  • 117
  • 216
114
votes
6 answers

Web Service vs WCF Service

What is the difference between them? When would I opt for one over the other?
Developer
  • 17,809
  • 26
  • 66
  • 92
110
votes
6 answers

Where is svcutil.exe in Windows 7?

For my WCF, I need to generate configuration file for my client application to specify things such as binding of service, the address of the service and the contract.
nellbryant
  • 3,109
  • 4
  • 20
  • 16
110
votes
12 answers

How to use Fiddler to monitor WCF service

I have a WCF service that accepts a complex type and returns some data. I want to use Fiddler to see what the incoming requests to the service looks like. The client is .net console app which uses a Service reference proxy. Is this possible with…
Quadwwchs
  • 1,425
  • 3
  • 15
  • 20
107
votes
10 answers

How do I pass values to the constructor on my wcf service?

I would like to pass values into the constructor on the class that implements my service. However ServiceHost only lets me pass in the name of the type to create, not what arguments to pass to its contrstructor. I would like to be able to pass in…
Ian Ringrose
  • 51,220
  • 55
  • 213
  • 317
106
votes
5 answers

How to use a WSDL file to create a WCF service (not make a call)

I have an old WSDL file and I want to create a server based on this WSDL file. The WSDL is generated from a ASMX (I suppose but I am not sure). How can I achieve this ? original question where the OP thought he needed to create a client based on…
Raha
  • 1,959
  • 3
  • 19
  • 28
105
votes
7 answers

HTTP Error 404.3 - Not Found" while browsing wcf service on Windows Server 2008(64bit)

I am developing an application based on .Net Framework 3.5 sp1 and hosted on windows server 2008(64bit). While browsing wcf service (.svc) locally every things is ok but while browsing with full domain URL, it got an error. local address is like…
Mori
  • 2,484
  • 5
  • 28
  • 45
103
votes
2 answers

What is WCF RIA services?

I hate MSDN's site for WCF RIA services. It does not say what it is, it only says what it does. It says what it can achieve but does not say why I need it. For example: "A common problem when developing an n-tier RIA solution is coordinating …
Aliostad
  • 80,612
  • 21
  • 160
  • 208
103
votes
9 answers

WCF chokes on properties with no "set ". Any workaround?

I have some class that I'm passing as a result of a service method, and that class has a get-only property: [DataContract] public class ErrorBase { [DataMember] public virtual string Message { get { return ""; } } } I'm getting an exception on…
Andrey
  • 20,487
  • 26
  • 108
  • 176
103
votes
4 answers

WCF Service , how to increase the timeout?

Might seem like a silly question, but everything in WCF seems a lot more complicated than in asmx, how can I increase the timeout of an svc service? Here is what I have so far:
JL.
  • 78,954
  • 126
  • 311
  • 459
102
votes
18 answers

A reference to the dll could not be added

When I add a .dll file as a reference in C# application it shows an error : A reference to the "....dll" could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component. ILDissassembler says…
user20358
  • 14,182
  • 36
  • 114
  • 186
99
votes
14 answers

Problems with X509Store Certificates.Find FindByThumbprint

I'm having a problem when I use the method X509Store.Certificates.Find public static X509Certificate2 FromStore(StoreName storeName, StoreLocation storeLocation, X509FindType findType, string findValue) { X509Store store = new…
nunofamel
  • 989
  • 2
  • 7
  • 5
99
votes
22 answers

WCF Error "This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case"

I'm having a problem using a WCF call from a Windows service to my WCF service running on my web server. This call has been working for a number of weeks, but then stopped working all of a sudden, and has not worked since. The exception I'm getting…
Sam Schutte
  • 6,666
  • 6
  • 44
  • 54
98
votes
13 answers

WCF Error - Could not find default endpoint element that references contract 'UserService.UserService'

Any ideas how to fix this? UserService.UserServiceClient userServiceClient = new UserServiceClient(); userServiceClient.GetUsersCompleted += new EventHandler(userServiceClient_GetUsersCompleted); …
NotDan
  • 31,709
  • 36
  • 116
  • 156
98
votes
1 answer

Visual Studio Wcf Test Client - entering an Int array

I've found the Visual Studio WCF test client quite useful when it comes to a quick test of my WCF service. This is the test client found in this location relative to your Visual Studio install directory: \Common7\IDE\WcfTestClient.exe I have a few…
WebDude
  • 6,125
  • 5
  • 33
  • 44