channelfactory

WCF Consumer Website: The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified

…衆ロ難τιáo~ 提交于 2019-12-05 20:14:23
I've got a simple WCF service that works great on localhost - consumed by another local website and is returning data. Now I upload my service to our host, changing the appropriate addresses in the web.config, and it breaks when the client calls it. Error: The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified. I've read several other posts and I believe I've done pretty much all there was to do - setting the bindings, etc. Below is my web.config for my wcf service (hosted through SSL): <?xml version="1.0"?> <!-- Note: As an

Getting error detail from WCF REST

孤人 提交于 2019-12-05 02:01:04
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 directly from C# I can easily access the response body when an error occurs. However, I'm using a WCF ChannelFactory with 6 quite complex interfaces. The exception thrown by this proxy is always a ProtocolException , with no useful details. Is there any way to get the response body when I get this error? Update I realise that there are a load of

Confusion about WCF Channels

末鹿安然 提交于 2019-12-04 20:15:36
问题 I am confused about the Proxy and Channels. According to my reading, WCF client is using a proxy which pass the message through a chain of channels. Every Channel is responsible of certain task, for example one channel is encoding the message and another Channel is encrypting it. My confusion begins when I saw the following code When proxy.MyMethod() is called, it actually called the whole chain of channels? The author used method called CreateChannel and named the identifier proxy. So in WCF

ChannelFactory bug with dynamic arguments

你。 提交于 2019-12-04 19:50:58
问题 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 EndpointAddress("http://www.restfulwebservices.net/wcf/StockQuoteService.svc"); var channel = new ChannelFactory<IStockQuoteService>(binding, endpoint).CreateChannel(); // this will print just fine Console.WriteLine(channel.GetStockQuote(src as

How do I create a simple Web Server using WCF without the ServiceHost class?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 15:49:51
问题 I've began to learn WCF and wish to understand its internals by creating a simple Web server using channel stacks directly. I have found a lot of theory in the web but I'd like to see a working sample code of receiving and responding an httprequest that I can test using any browser. I'm hoping for something that shows the setup of a custom binding by assembling binding elements all the way to responding the request. 回答1: Got the answer in MSDN forums : static void RunService() { //Step1:

WCF ChannelFactory and Channel caching in ASP.NET client application

独自空忆成欢 提交于 2019-12-04 12:12:06
问题 I'm building a series of WCF Services that are going to be used by more than one application. Because of that I'm trying to define a common library to access WCF services. Knowing that each service request made by different users should use a different Channel I'm thinking in cache the Channel per-request ( HttpContext.Current.Items ) and cache the ChannelFactory used to create the channel per Application ( HttpApplication.Items ) since I can create more than one channel with the same

Alternative to service reference

十年热恋 提交于 2019-12-04 10:55:36
I am trying to assist one project team to streamline their work by fixing some of the pain points. One of the pain points they have in their code is that, they are using WCF service via service references (proxy) [i.e. "Add Service Reference" in Visua Studio 2008. This creates a lot of problem including deployment overhead, Souce Control get latest related problems of updating proxy etc. In order to handle these and other related issues with service reference, I am looking for a good alternative to service references. I have already seen ChannelFactory and I am leaning towards that most. That

WCF ChannelFactory State Property

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 02:11:31
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 service? A ChannelFactory object has a State because it is a CommunicationObject , and all CommunicationObjects in WCF have a State . Of course, that's just begging the question, and not really helpful. The real question boils down to two parts Why does ChannelFactory derive from CommunicationObject What does its State actually means? The second one is

Confusion about WCF Channels

夙愿已清 提交于 2019-12-03 14:21:34
I am confused about the Proxy and Channels. According to my reading, WCF client is using a proxy which pass the message through a chain of channels. Every Channel is responsible of certain task, for example one channel is encoding the message and another Channel is encrypting it. My confusion begins when I saw the following code When proxy.MyMethod() is called, it actually called the whole chain of channels? The author used method called CreateChannel and named the identifier proxy. So in WCF architecture Proxy is just a spacial high level channel, it is not a stand alone architecture element?

ChannelFactory bug with dynamic arguments

ぃ、小莉子 提交于 2019-12-03 12:51:23
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 EndpointAddress("http://www.restfulwebservices.net/wcf/StockQuoteService.svc"); var channel = new ChannelFactory<IStockQuoteService>(binding, endpoint).CreateChannel(); // this will print just fine Console.WriteLine(channel.GetStockQuote(src as string)); // this will print just fine Console.WriteLine(new StockQuoteServiceClient().GetStockQuote(src));