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

Best architecture for a 30 + hour query

I have an interesting problem to solve. One of my clients has me developing a stock analysis program with close to 50 years of stock data for almost a thousand symbols. I've developed a series of filters that are applied on any given day to see if…
Mike Malter
  • 1,018
  • 1
  • 14
  • 38
11
votes
1 answer

How to change the default schemalocation in wsdl file of WCf Service?

Following is the wsdl file of my service:
Googler
  • 525
  • 3
  • 12
  • 30
11
votes
1 answer

WCF Error {"The username is not provided. Specify username in ClientCredentials."}

I have a WCF webservice hosted in IIS. Here is the configuration of the same: When i try to consume this particular service (when added as a service reference) in my WinForms client, it throw this exception: The username is not provided. Specify…
Nuclear - Core
  • 159
  • 1
  • 2
  • 9
11
votes
3 answers

WCF Service in Separate Assembly

What is the correct way to create a WCF service in separate assembly but then expose its endpoint through a Web Project in the same solution?
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
11
votes
1 answer

How to implement Self-host WCF data services (http://localhost:1234/myDataService.svc/...)

I have a project that needs to implement WCF data services (OData) to retrieve data from a control system (.NET Framework Application). The WCF data service needs to be hosted by the .NET application (No ASP.NET and NO IIS). I have seen many WCF…
warmcold
  • 119
  • 1
  • 3
11
votes
11 answers

Visual Studio 2010 randomly unable to debug WCF service

I'm running Visual Studio 2010 on a Windows 7 x64 machine, and occasionally VS is giving me the good old "The remote procedure could not be debugged.This usually indicates that debugging has not been enabled on the server" error that a lot of people…
rossisdead
  • 2,102
  • 1
  • 19
  • 30
11
votes
1 answer

wcf callback exception after updating to .net 4.0

I have a wcf service that uses callbacks with DualHttpBindings. The service pushes back a datatable of search results the client (for a long running search) as it finds them. This worked fine in .Net 3.5. Since I updated to .Net 4.0, it bombs out…
James
  • 7,877
  • 7
  • 42
  • 57
11
votes
1 answer

Mapping object type property to varbinary(MAX) in Entity Framework

I have a situation where I have a type with a property of type object, eg. public class MyType { public virtual object MyProp{get; get;} } This type will have to be: Saved using Entity Framework to a database, as a byte[] (I have figured the…
tinonetic
  • 7,751
  • 11
  • 54
  • 79
11
votes
4 answers

wcf trying to set up tracing to debug, not writing to log file

here's my web.config, running a WCF service in an application on IIS7, but nothing is being written to the specified file. permission on the file has been granted for everyone.
joey j
  • 111
  • 1
  • 1
  • 4
11
votes
3 answers

All about WSDL vs MEX?

I am not able to open the meta data url http://localhost:8082/Tasks/mex, even though I've added the mexHttpBinding in the config file. Can I view this MEX endpoint in a browser? The config files look like:
Aakash
  • 695
  • 3
  • 10
  • 25
11
votes
5 answers

HTTP 415 Cannot process the message because the content type 'application/json; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'

We have a webservice that works fine on HTTPS but shows the HTTP 415 error on HTTPS. So, under HTTP, we can make a POST request sending and receiving JSON without issue. When we try the same under HTTPS we got the error that the service is expecting…
momo
  • 3,404
  • 6
  • 37
  • 66
11
votes
2 answers

WCF service error - Incoming message has an unexpected message format 'Raw'. Expected message formats are 'Xml', 'Json'

I want to send data in jason format to a wcf service for processing. Wcf service is developed and when jason input is sent to the service using fiddler, it throws the error - The server encountered an error processing the request. The exception…
bdotnet
  • 343
  • 1
  • 4
  • 16
11
votes
3 answers

Why returning dataset or data table from WCF service is not a good practice? What are the Alternatives?

I am working on University Management System on which I am using a WCF service and in the service I am using DataTables and DataSets for getting data from database and database is sql server. My questions are Is using DataTables and Datasets "Good…
Khurram Ali
  • 1,659
  • 4
  • 20
  • 37
11
votes
1 answer

Setup Ninject for WCF

Does anyone have a clear instruction on how to setup Ninject in WCF? been googling around but I cant see any updated guidelines on how to use Ninject in WCF.
Romeo
  • 1,791
  • 8
  • 25
  • 41
11
votes
3 answers

Why can't I use WCF DataContract and ISerializable on the same class?

I have a class that I need to be able to serialize to a SQLServer session variable and be available over a WCF Service. I have declared it as follows namespace MyNM { [Serializable] [DataContract(Name = "Foo", Namespace =…
Dave
  • 2,552
  • 5
  • 25
  • 30