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
1169
votes
16 answers

Collection was modified; enumeration operation may not execute

I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur. Collection was modified; enumeration operation may not execute Below is the code. This is a WCF server in a Windows service. The method…
cdonner
  • 37,019
  • 22
  • 105
  • 153
840
votes
18 answers

Best Practices for securing a REST API / web service

When designing a REST API or service are there any established best practices for dealing with security (Authentication, Authorization, Identity Management) ? When building a SOAP API you have WS-Security as a guide and much literature exists on the…
Nathan
  • 12,290
  • 3
  • 29
  • 28
502
votes
11 answers

WCF vs ASP.NET Web API

I've spent a few months trying to grasp the concepts behind WCF and recently I've developed my first WCF service application. I've struggled quite a bit to understand all the settings in the config file. I am not convinced about the environment but…
LeftyX
  • 35,328
  • 21
  • 132
  • 193
493
votes
13 answers

WCF - How to Increase Message Size Quota

I have a WCF Service which returns 1000 records from database to the client. I have an ASP.NET WCF client (I have added service reference in asp.net web application project to consume WCF). I get the following message when I run the client…
bugBurger
  • 6,950
  • 9
  • 32
  • 39
436
votes
6 answers

REST / SOAP endpoints for a WCF service

I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service. Anyone has done something like this before?
Wessam Zeidan
  • 4,531
  • 3
  • 18
  • 7
423
votes
26 answers

What is the best workaround for the WCF client `using` block issue?

I like instantiating my WCF service clients within a using block as it's pretty much the standard way to use resources that implement IDisposable: using (var client = new SomeWCFServiceClient()) { //Do something with the client } But, as…
Eric King
  • 11,594
  • 5
  • 43
  • 53
414
votes
11 answers

POSTing JsonObject With HttpClient From Web API

I'm trying to POST a JsonObject using HttpClient from Web API. I'm not quite sure how to go about this and can't find much in the way of sample code. Here's what I have so far: var myObject = (dynamic)new JsonObject(); myObject.Data = "some…
Mark
  • 21,067
  • 14
  • 53
  • 71
389
votes
35 answers

Could not find default endpoint element

I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error: Could not find default endpoint element that references contract 'IMySOAPWebService' in the ServiceModel client configuration…
edosoft
  • 17,121
  • 25
  • 77
  • 111
388
votes
5 answers

What are the differences between WCF and ASMX web services?

I am totally confused between WCF and ASMX web services. I have used a lot of web services in my earlier stage, and now there is this new thing introduced called WCF. I can still create WCF that function as a web service. I think there will be…
shailesh
  • 5,013
  • 5
  • 23
  • 22
342
votes
50 answers

The breakpoint will not currently be hit. No symbols have been loaded for this document in a Silverlight application

Ok, what I have: Visual Studio 2010 RC, W7 x64, started a new project type of Silverlight application. Hosting the Silverlight application in a ASP.NET Web Application Project. Silverlight Version 3.0. Added a LinqToSQL Class, a WCF Service, a…
Christian Casutt
  • 2,334
  • 4
  • 29
  • 38
331
votes
16 answers

The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via

I am trying to make a WCF service over basicHttpBinding to be used over https. Here's my web.config:
isg
  • 3,311
  • 2
  • 16
  • 3
307
votes
6 answers

Guid is all 0's (zeros)?

I'm testing out some WCF services that send objects with Guids back and forth. In my web app test code, I'm doing the following: var responseObject = proxy.CallService(new RequestObject { Data = "misc. data", Guid = new Guid() }); For some…
Didaxis
  • 8,486
  • 7
  • 52
  • 89
287
votes
12 answers

WCF on IIS8; *.svc handler mapping doesn't work

I'm trying to get a WCF service running in IIS8 on Windows Server 2012 build 8400. When installing the web role the WCF stuff (under 3.51) wasn't to be found like in Windows Server 2008. When installed the svc handler mapping was missing, so i did…
Carl R
  • 8,104
  • 5
  • 48
  • 80
237
votes
6 answers

Namespace for [DataContract]

I can't find the namespace to use for [DataContract] and [DataMember] elements. According to what I've found, it seems that adding the following should be enough, but in my case it is not. using System; using System.Runtime.Serialization; Here is a…
Otiel
  • 18,404
  • 16
  • 78
  • 126
237
votes
6 answers

How do I return clean JSON from a WCF Service?

I am trying to return some JSON from a WCF service. This service simply returns some content from my database. I can get the data. However, I am concerned about the format of my JSON. Currently, the JSON that gets returned is formatted like…
user208662
  • 10,869
  • 26
  • 73
  • 86
1
2 3
99 100