Questions tagged [channelfactory]

WCF ChannelFactory class - used to create and manage Channel-s which are used to send and receive Message-s to WCF service endpoints

Channel-s and the mechanism to create and manage them, the ChannelFactory class is part of the messaging layer in Microsoft's Windows Communication Foundation architecture. The messaging layer connects the activation and hosting layer of WCF with higher level layers such as the service runtime, contracts, and application at the very top. A channel is a component that processes a WCF message in some way, for example, by authenticating a message. A set of channels is also known as a channel stack. Channels operate on messages and message headers. The generic ChannelFactory class is used in advanced scenarios that require the creation of a channel factory that can be used to create more than one channel. (Source: MSDN)

170 questions
82
votes
6 answers

WCF ChannelFactory vs generating proxy

Just wondering under what circumstances would you prefer to generate a proxy from a WCF service when you can just invoke calls using the ChannelFactory? This way you won't have to generate a proxy and worry about regenerating a proxy when the server…
TheWommies
  • 4,922
  • 11
  • 61
  • 79
47
votes
4 answers

creating WCF ChannelFactory

I'm trying to convert an existing .NET Remoting application to WCF. Both server and client share common interface and all objects are server-activated objects. In WCF world, this would be similar to creating per-call service and using…
Eric
  • 911
  • 1
  • 10
  • 18
46
votes
4 answers

WCF Error : Manual addressing is enabled on this factory, so all messages sent must be pre-addressed

I've got a hosted WCF service that I created a custom factory for, so that this would work with multiple host headers: /// /// Required for hosting where multiple host headers are present /// public class…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
33
votes
4 answers

ChannelFactory.Close VS IClientChannel.Close

Consider the following code which is typcial of many ChannelFactory examples: WSHttpBinding myBinding = new WSHttpBinding(); EndpointAddress myEndpoint = new EndpointAddress( ConfigurationSettings.AppSettings["HelloWorldServiceURL"]); …
Daniel Auger
  • 12,535
  • 5
  • 52
  • 73
22
votes
3 answers

WCF Channel and ChannelFactory Caching

So I've decided to up the performance a bit in my WCF application, and attempt to cache Channels and the ChannelFactory. There's two questions I have about all of this that I need to clear up before I get started. 1) Should the ChannelFactory be…
Didaxis
  • 8,486
  • 7
  • 52
  • 89
18
votes
3 answers

ChannelFactory Credentials + object is read only

Greetings, what is the problem that when I try to set credentials for my factory as follows: ChannelFactory factory = Factory; if (factory != null) { factory.Credentials.UserName.UserName =…
niao
  • 4,972
  • 19
  • 66
  • 114
13
votes
2 answers

How to apply Task Async Pattern and WCF's ChannelFactory?

We have a robust WCF client built in 2008 on .NET 3.5 (now recompiled under .NET 4.0) that talks to our own WCF service over the net.tcp binding. The robust client uses ChannelFactory() to generate a service proxy, through…
Bellarmine Head
  • 3,397
  • 2
  • 22
  • 31
12
votes
1 answer

WCF ChannelFactory and channels - caching, reusing, closing and recovery

I have the following planned architecture for my WCF client library: using ChannelFactory instead of svcutil generated proxies because I need more control and also I want to keep the client in a separate assembly and avoid regenerating when my WCF…
JustAMartin
  • 13,165
  • 18
  • 99
  • 183
11
votes
3 answers

Creating a singleton ChannelFactory and reusing for client connections

In our SharePoint/ASP.NET environment we have a series of data retriever classes that all derive from a common interface. I was assigned the task of creating a data retriever that could communicate remotely with other SharePoint farms using WCF. The…
10
votes
2 answers

WCF ChannelFactory State Property

What does it mean for a ChannelFactory to have a State property? I understand that a created channel can have connection based states. But am confused as to why the ChannelFactory also has such connection states. Does it too connect to the WCF…
Nicholas
  • 1,392
  • 16
  • 38
10
votes
1 answer

WCF, ChannelFactory, "Could not find endpoint element..."

I'm trying to call a WCF service from within another service, in part using an example I found here on StackOverflow which implements ChannelFactory. I've created a separate console app project within my solution for testing (VS 2008, btw),…
Darth Continent
  • 2,319
  • 3
  • 25
  • 41
10
votes
2 answers

Dispose Channel created by WCF ChannelFactory

I'm looking for a clean way to have the ChannelFactory create channels for me with the ability to dispose them after use. This is what I got: public class ClientFactory : IClientFactory { private const string endpointName = "IMyService"; …
David
  • 3,736
  • 8
  • 33
  • 52
9
votes
6 answers

Getting error detail from WCF REST

I have a REST service consumed by a .Net WCF client. When an error is encountered the REST service returns an HTTP 400 Bad Request with the response body containing JSON serialised details. If I execute the request using Fiddler, Javascript or…
Keith
  • 150,284
  • 78
  • 298
  • 434
9
votes
4 answers

Direct Channel usage vs using a Proxy?

As the title implies I am trying to get an understanding of why in WCF sometimes people choose to "generate proxies" vs using a ChannelFactory to manually create new channel instances. I have seen examples of each, but haven't really found any…
MrLane
  • 1,728
  • 22
  • 41
8
votes
1 answer

ChannelFactory bug with dynamic arguments

This question is related to Bug in the dynamic language runtime in combination with IIS 7.5 ChannelFactory hangs if I provide it with a correctly typed dynamic object. dynamic src = "MSFT"; var binding = new BasicHttpBinding(); var endpoint = new…
Juliano
  • 2,402
  • 1
  • 20
  • 22
1
2 3
11 12