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

Either a required impersonation level was not provided, or the provided impersonation level is invalid

I'm having some issues with a WCF service and Impersonation, I've distilled this to a simple method below. The WCF service is currently self hosted in an exe. The exception message is "Either a required impersonation level was not provided, or the…
Martin Clarke
  • 5,636
  • 7
  • 38
  • 58
11
votes
1 answer

Does ConcurrencyMode of Multiple have relevance when InstanceContextMode is PerCall for a WCF service with Net.Tcp binding?

I always thought that setting InstanceContextMode to PerCall makes concurrency mode irrelevant even if using a session aware binding like net.tcp. This is what MSDN says http://msdn.microsoft.com/en-us/library/ms731193.aspx "In PerCallinstancing,…
softveda
  • 10,858
  • 6
  • 42
  • 50
11
votes
7 answers

autofac wcf registration error

I'm trying to attempt a structure with Autofac on Wcf. namespace WcfService1.Model { [DataContract(IsReference = true)] public partial class Account { [DataMember] public int Id { get; set; } …
Eray Çakır
  • 111
  • 1
  • 3
11
votes
2 answers

WCF Client ignores timeout values when service down

I have a VB .NET application that uses WCF. I've set the client timeouts for everything in code: Dim oMastSrv As MastSvc.IclsIOXferClient = Nothing Dim binding As New ServiceModel.NetTcpBinding("NetTcpBinding_IclsIOXfer") Dim intTimeout…
MarkFisher
  • 516
  • 4
  • 15
11
votes
2 answers

How to inject an object into a WCF validator class

Following up on using dependency injection for WCF services, is there any way of using DI for WCF validators, so that one could do this: public class DIValidator : UserNamePasswordValidator { private readonly IService service; [Inject] …
Blake Pettersson
  • 8,927
  • 3
  • 27
  • 36
11
votes
4 answers

X.509 certificates on WCF?

Problem : I'm developing this program on one machine. The service works fine in development server, but when I try to host the service in IIS it gives me an error that: Cannot find the X.509 certificate using the following search criteria:…
11
votes
2 answers

Consuming a WCF WsHttpBinding WebService in Java

I'm trying to get a Java Client to communicate with a WCF wshttpbinding WebService. But I am unable to do so. The call either hangs, or I get "musunderstoodheader expcetions". My Web Service is just the default Visual Studio generated "WCF Service…
vicsz
  • 9,552
  • 16
  • 69
  • 101
11
votes
1 answer

Why Dispose is being called on DataContract even though the service still refers to it?

I have defined the following DataContract which implements IDisposable: [DataContract] public class RegularFileMetadata : FileMetadataBase, IDisposable { bool _Disposed = false; //note this! //... protected virtual void Dispose(bool…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
11
votes
2 answers

Why can't a DataMember in WCF return Type?

Trying to get this to work, with no luck: [DataMember] public Type ParameterType { get; set;}
AKoran
  • 1,846
  • 6
  • 22
  • 36
11
votes
1 answer

WCF - Is a service certificate needed to authenticate clients?

I think there's a gap in my mental model of WCF authentication, hoping someone can help me fill it in. So, I'm creating a WCF service and would like to have clients authenticate using certificates, and message-level security. I'd like the service to…
user1454265
  • 868
  • 11
  • 25
11
votes
2 answers

Passing FormsAuthentication cookie to a WCF service

I have a website that talks to a remote WCF web service. Both use the same custom FormsAuthentication Provider. I would like to authenticate with the WCF service impersonating the user currently logged in the site. I already did this manually, using…
Ariel Popovsky
  • 4,787
  • 2
  • 28
  • 30
11
votes
3 answers

Unable to change Culture in WCF

I'm running on a windows 2008 server. I have one Web service which calls a wcf service. Within the WCF service it attempts to cast a date 20/08/2010 which fails because it thinks it in US format not Austrlaian. So far I have: On control panel…
ErickTreetops
  • 3,189
  • 4
  • 27
  • 37
11
votes
1 answer

Do WCF Callbacks TimeOut

I've written a system that uses a Duplex NetTcp Channel with a callback to function as a publish/subscribe server. Do I have to worry about the callback timing out if not connection is sent after a while or will the callback pipe be maintained…
Omar Kooheji
  • 54,530
  • 68
  • 182
  • 238
11
votes
1 answer

Is it possible in WCF REST 4 to return HTML as one of the response formats

I have a service which I am writing that is intended to be used by multiple callers, including ones that are incapable of receiving or parsing XML or JSON. I know its possible to return HTML from a service response using the raw stream, but what I…
GrayWizardx
  • 19,561
  • 2
  • 30
  • 43
11
votes
2 answers

WCF Client Configuration: how can I check if endpoint is in config file, and fallback to code if not?

Looking to make a Client that sends serialized Message objects back to a server via WCF. To make things easy for the end-developer (different departments) would be best that they didn't need to know how to edit their config file to set up the client…
Ciel