wcf-client

WCF client proxy for ASP .NET client

I need some advice on what's the best way to create WCF client proxy wrapper for ASP .NET client. I want to work equally well with ObjectDataSource control with no extra coding and also when I need to manually call WCF service to get some data. I basically have come up with two models, but I'd like to know which is is more efficient. He...

Custom exception handling in WCF Service and Client

What you think about this approach: Fault helper: [Serializable] public class WcfHwServiceFault { private readonly Guid _guid; private readonly byte[] _data; private WcfHwServiceFault(Guid guid, byte[] data) { _guid = guid; _data = data; } public static WcfHwServiceFault Create(Exception ex) ...

C#: Proper way to copy HttpQueryString parameters?

A little background: I'm using the WCF REST Starter kit, and I'm creating a wrapper for a specific API I'm consuming. There are common query string parameters that I need to pass whenever I hit any of the exposed methods, such as an API key. To me, it would be easier to make such common parameters a part of the wrapper class. Then I cou...

Is there an execution timeout for WCF operations marked as OneWay?

Does the OneWay operations in WCF service execute as long as the operation is complete? By my experiment, I think there is no timeout. I was able to run an operation for half an hour. (I closed after that) Can someone experienced in WCF answer this? If there is a timeout, where can I specify it ...

WCF service with wsHttpBinding and x509 Certificate - can I consume/connect using VB/C# WITH PHP?

We connect to a web service hosted by another company. We send a customer's basic info to the service, and it replies with rates/prices for that customer. I am a PHP guy -- started out playing with basic HTML, then delved into PHP about 8 years ago, and my entire web app is PHP with javascrtipt/ajax mixed in as needed. I'm a learn-as-...

Dependency Inject with Ninject 2.0

A little question regarding Ninject. I use a WCF 'duplex channel' to communicate with a service. The channel is defined as an interface, lets call it IMyChannel for simplicity. To instantiate a channel we use DuplexChannelFactory<IMyChannel> object's CreateChannel() method. So far I have manage to bind the factory class with this. Bin...

How to get raw XML in WCF Client from Web Service call

I have a WCF Client (console app) that calls a WCF web service and I'm trying to get the raw XML response from within my Console Application. Does anyone have an idea or code snippet on how to do this? ...

How to prevent WCF message logging from eliding the SOAP body ?

I have a WCF client for which I need to log messages. I need the complete SOAP envelope of both requests and replies. My app.config file has logging set up thusly: <diagnostics> <messageLogging logMalformedMessages="false" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="false" logEntireMessage="true" ...

WCF Client - only first 255 bytes of stream returned from WCF service contain values

I have been tasked to look after an ASP.Net WebForms application that communicates with a WCF service hosted by a Windows service. The binding used for the service is netTcpBinding. The service exposes methods to Upload and Download ‘files’. The user select to upload a file and the HttpPostFile.InputSteam is passed directly to the servi...

WCF Property not visible on Client

I am currently developing a WCF service .net 4.0 which has got 2 properties. For some reason those property is not visible on the client. Following is the code for the service. using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.We...

WCF data marshalling

1st of all, apologies if this is a basic/simple WCF question, i'm a WCF newbie and haven't come across this so far. Question 1 - Is there a way to see what data is marshalled on a wcf service call ? and given the following definitions Interface IX { List<string> list; Dictionary<string,MyType> dict; } Interface IY : IX { L...

Extending a WCF service and its auto-generated client service reference

I am relatively new to .Net and C# development and am having an issue decoupling WCF services from an app into a network DLL I am creating. The DLL's goal is to offer a simple way to host and access a service from a server and client application and to add some functionality to the basic service for heartbeat and automatic reconnection w...

Consuming a WDDX REST-ish API with WCF

I've got some somewhat old school web services that I need to talk to. They are somewhat REST-like, in that they are called with regular GET and POST HTTP requests, and return WDDX-formatted data in the response body. The consumer code in this instance is .NET. Ideally, I'd like to use WCF to take advantage of all of its magic. The stic...

Dynamically change WCF endpoint address using a behavior

I want to dynamically change the address of a WCF service called from my client based on custom information in the client's application configuration file. My first attempt was to create an endpoint behavior, and implement the IEndpointBehavior.Validate method, implemented something like the following: void IEndpointBehavior.Validate(S...

Question on WCF Security in a Client Application

What I'm trying to do is setup a call to a service on another server. So far.. I've created the proxy and got the config information. What I'm having trouble finding is how to set the security. They are using message security and client certificates. here is my app.config file..what I have so far. Any information on setting the sec...

Getting 'No code was generated' error when trying to create web service proxy using SVCUTIL.EXE

When trying to create a web service proxy (WCF) using SVCUTIL.EXE (on command line or via Visual Studio) I get the below nonsensical error message. Note: There is nothing wrong with the service as it works on another machine just fine. It's a new install of Windows and the service is on my local box. Generating the same proxy on my mach...

Are there any free/open-source WCF client frameworks/libraries out there?

I am working on a tool that will test the server of a Silverlight application. AFAIK, Silverlight uses WCF to communicate with the server. I am curious if here are any free tools out there that can enable to write test scripts that test the server via WCF, preferably in Java, Python, Ruby or anything that does not require .NET. ...

Issue adding service reference for wcf

Warning 1 Custom tool warning: Cannot import wsdl:binding Detail: The given key was not present in the dictionary. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://wrapper.dao.ccarwebservice.ids.com']/wsdl:binding[@name='CCaRWebServiceHttpBinding'] C:\Users\me\Documents\Visual Studio 2008 \Projects\CcarsWcfTest\CcarsWc...

Creating custom objects for wcf

Hi, I have an existing web application that uses EF and POCO objects. I want to improve the client experience by exposing some of my objects through WCF(JSON). I have this working fine but where I am unsure is how to handle derived objects(not sure if that is the correct term) or IEnumerable anonymous objects if you will. Let's say I ...

WCF NetDispatcherFaultExcption when passing byte array from Service to Client

I am trying to pass a file (byte array) from the service to the client. I receive "the formatter threw an exception while trying to deserialize Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''" error. Any ideas on how to fix it will be much appreciated. Thanks, Raja ...