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
3 answers

Basic Authentication for WCF

I am trying to do a very basic but secure username/password authentication with wcf. However when I look at the value of the ServiceSecurityContext.Current.PrimaryIdentity; it contains the credentials of my windows machine and claims it is…
coolblue2000
  • 3,796
  • 10
  • 41
  • 62
11
votes
3 answers

Custom WCF DataContractSerializer

Is it possible to replace dataContractSerializer in Windows Communication Foundation with my own serializer. If it is possible, how can I achieve this?
mkus
  • 3,357
  • 6
  • 37
  • 45
11
votes
3 answers

WCF Test Client says Added Service Successfully but shows nothing

I opened C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE I added http://localhost:44652/MyService.svc It says added successfully but I see absolutely nothing in the test client, it looks the same as if I first opened it. Not sure why…
PositiveGuy
  • 46,620
  • 110
  • 305
  • 471
11
votes
6 answers

WCF Tracing. How I can get the exact reason for closing connection?

In my WCF service, when trying transfer large data I constantly get an error: The underlying connection was closed: The connection was closed unexpectedly I want to know what particular reason invokes this error, so I set up WCF Tracing and can read…
rem
  • 16,745
  • 37
  • 112
  • 180
11
votes
5 answers

Configure IIS Express 8 to enable CORS

I'm writing WCF services that will be used by clients out in the wild so they need to handle cross-origin requests. I have a problem with enabling my development server to accept such requests. Here is the scenario: I'm running the WCF project in…
djo.dadof2
  • 159
  • 1
  • 2
  • 9
11
votes
8 answers

WCF, BasicHttpBinding: Stop new connections but allow existing connections to continue

.NET 3.5, VS2008, WCF service using BasicHttpBinding I have a WCF service hosted in a Windows service. When the Windows service shuts down, due to upgrades, scheduled maintenance, etc, I need to gracefully shut down my WCF service. The WCF service…
David Chappelle
  • 1,243
  • 5
  • 13
  • 29
11
votes
3 answers

Named pipe not found when using WCF netNamedPipeBinding

I am the developer of a WCF service. My test clients work very well with it. But when it comes to real clients (using the same client proxy), it fails. The same WCF service works with netTcpBinding, this error occurs only with netNamedPipeBinding,…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
11
votes
2 answers

Expose a WCF Service through a Named Pipes binding

Intro: I successfully implemented a WCF Service hosted in a Windows Service a few days ago. The community here at StackOverflow helped me with the WSDL exposure here. I thank you once again. However recently I found out that there is another…
Andrei Rînea
  • 20,288
  • 17
  • 117
  • 166
11
votes
2 answers

Error message 'InterfaceName' does not implement interface member 'InterfaceMember'

The code below gives me this error: 'JsonWcfService.GetVenues' does not implement interface member 'GetVenuesByLocation(string search)'. I am fairly new to C# and .NET so most of this is copy and paste. IGetVenues.cs using System; using…
Jason Wragg
  • 589
  • 2
  • 5
  • 19
11
votes
2 answers

Programmatically set WCF timeout in debug mode

I'm using WCF in communication between a server and client (both written in C#). In release-mode, the timouts should be set to ~20 seconds, but in debug mode I want to set them to a higher value so that I can debug/step in my code without the…
Martin
  • 113
  • 1
  • 1
  • 4
11
votes
1 answer

WCF Service app.config

I'm developing a WCF Service and I'm a little confused about where its consuming its configurations. I have an app.config file in my host application (console application) and in my WCF Service project (came with the template) In run time I can see…
Omri Btian
  • 6,499
  • 4
  • 39
  • 65
11
votes
3 answers

What purpose does the WCF client-specified "userPrincipalName" serve?

I've created a WCF service with a wsHttpBinding and Message security. Then I added a service reference which resulted in the client's config file being updated with this:
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
11
votes
3 answers

Make a single WCF service support both SOAP, REST and WSDL

I'm trying to build a C# service in .NET 3.5 that supports both SOAP - and shows the WSDL - and REST. The SOAP service and WSDL generation was easy enough to do using the ServiceHost and a BasicHttpBinding classes. Got that working and the client…
Jason Swager
  • 6,421
  • 6
  • 41
  • 56
11
votes
3 answers

WCF extensions without including the assembly version

As discussed here, I'm trying to add a WCF endpoint-extension; I've got it working, but I need to include the full assembly details:
Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
11
votes
3 answers

Invalid Operation Exception

I created a WCF Serice that worked fine when hosted on IIS. now, I took the same service, and created a host application in WPF, and when trying to start the service from that application, I get this exception : The HttpGetEnabled property of…
Attilah
  • 17,632
  • 38
  • 139
  • 202