wcf-client

WCF REST Starter Kit - A property with the name 'UriTemplateMatchResults' already exists.

Hello, I just started with the WCF REST Starter Kit. I created a simple service that return an array of an object. Using the browser, everything works fine but when I use a WCF client, I get an ArgumentException. I'm not using IIS and here is the code: The contract: [ServiceContract] public interface IGiftService { [WebGe...

How to make sure you dont get WCF Faulted State Exception?

I am getting this exception "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state" The WCF service uses the default wsHttpBinding. I am using WCF in the following way wherever I am using it - using (var proxy = new CAGDashboardServiceClien...

Are there known limitations with the WCF Test Client app?

This has happened a couple of times to me know. If I add to many OperationContract's to a ServiceContract, the WCF Test Client app throws an exception: "Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata." In the details it continues: Error: Cannot obtain Metadata ...

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 noted in this MSDN article, wrapping a WCF client in a using block could mask any errors tha...

WCF Test Client error: Failed to Invoke the service

I'm getting an error when trying to use the WCF Test Client with my WCF service. Here is the service code: [ServiceContract] public interface IEmployeeService { [OperationContract(Name = "GetEmployee")] [WebGet(RequestFormat = WebMessageFormat.Xml, UriTemplate = "/Employees/{employeeNumber}")] Employee GetEmployee(strin...

Possible to consume badly formed Fault Messages?

I've a WCF client communicating with an unknown server implementation which I have no control over. This client works fine it just doesn't like, what appears to be, incorrectly formed SOAP Fault messages. The messages I receive look like: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header>...</so...

How do I configure a WCF client that expects a plain text response?

I am trying to create a wcf client for tinyUrl. However, the tinyUrl API returns a plain text response and the WCF webHttpBinding doesn't seem to understand it. Is there anyway to tell WCF I am expecting a plain text response from the server? ...

ASP.NET Application Services and an ASP.NET website

I'm busy building a .NET WCF framework for my company which will allow us to quickly and easily implement community type websites moving forward. The framework currently caters for things like Blogging, Forums and commenting on them etc. I wanted to now implement Membership into the framework, and read up about ASP.NET Application Serv...

Streaming Image files using Wcf

hi, I want to send a large image to server through Wcf.I may pass it as a byte[].How can i do that.What is MTOM...where can i find a sample...? ...

How to consume multiple WCF services from one client

I am still learning the whole WCF thing, so please bear with me here. What I have is two self hosted services created using C# and VS 2008: Service # 1 Adds two numbers and returns the result. Service # 2 Returns the square of a number. I want the client to be able to send in two numbers to Service 1, get the sum and then send the su...

WCF and gSOAP - interoperable code?

I'm trying to write a simple WCF Server + gSOAP client proof-of-concept application using SOAP 1.2 protocol. Here's server code: [ServiceContract(Namespace="http://test.com")] public interface IService1 { [OperationContract] void HelloWorld(); } [ServiceBehavior(Namespace = "http://test.com")] public class Service1 : IService1 ...

Does each authenticated WCF client connection need a CAL?

Just like the title says. Does each authenticated WCF client connection to a WCF server that you have developed need a windows CAL? http://www.microsoft.com/windowsserver2008/en/us/client-licensing.aspx Microsoft's licensing on that page sure makes it sound like it, but I can't find anything out there that confirms, or even denies thi...

Problem exposing custom complex interface types in WCF services

I'm trying to get hold of an object from another application using WCF. With built in classes it works fine but I run into probems when trying to return a custom interface type from the WCF operation. Whether I include the interface in both applications separately, or specif it as a shared assembly, I get the same result: a Communicati...

How to get EF Objects to work in the WCFTestClient

I have a solution that has some EF objects. I want to pass them down to the client. When I try to test this in the WCFTestClient.exe I get this error on my objects: "This operation is not supported in the wcf test client" Is there a way to set things up so I can pass my Entity objects down to the client or am I going to have to make ...

Determine wsHttpBinding at runtime with WCF

I have a web application that exposes web services using WCF and wsHttpBindings. It is possible to have the application on different machines and different urls. This would mean the WCF service location would be different for each. I am building a Windows Service that will reference each application and perform a task. Each task needs t...

Problem with generating WebService proxy using svcutil

In our application we are forced to consume several WebServices. In the beginning we used just the "Add Service Reference" menu option, in order to create a WCF proxy. The wizard didn't generate a DataContract, but much rather an XML-Serializable class. So far, so bad, but this wasn't the killer. However, later we noticed, that we were ...

Select configuration file on creating WCF proxy instance

Hi Is it possible to create WCF proxy by the given config file, not app.config? Thanks a lot! ...

WCF Client Configuration: how to check if endpoint is in config file, and fallback to code if not?

Morning: Looking to make a Client that sends serialized Message objects back to a server via WCF. To make things easy for the end-developer (different departments) would be best that they didn't need to know how to edit their config file to set up the client end point data. That said, would also be brilliant that the endpoint wasn't e...

Two WCF services with different contracts but same business objects

Hi, For example I have two services hosted in IIS. [ServiceContract] public interface IDeviceService { [OperationContract] DeviceCollection GetAllDevices(Customer customer); } [ServiceContract] public interface IUserService { [OperationContract] User Authenticate(string username, string password); } Both the User ...

.NET Web Service Client - Client found response content type of 'text/plain', but expected 'text/xml'

I have an ASP.NET webpage that has a web reference to a SOAP WSDL. If I call the methods associated with this WSDL (the methods live on another server), everything works fine. However, I'd like to be able to dynamically change the endpoint address where the WSDL points. The reason being that we host the same set of web services for diffe...