wcf-client

Web application reference to WCF does not generate proxy classes ?

Currently we have website that must consume a WCF service because our we have x64 web servers and have code dependencies on 32-bit third party assemblies which are not x64 compatible. So WCF service is a wrapper. When I add the "service reference" there are several file generated but no .cs file. I thought there was suppose to be a refe...

How do I return an interface from a WCF Service?

Lets say I have some interfaces: public interface IFoo { IBar DoesStuff(); } public interface IBar { string Thingo { get; } } I'm consuming this code throughout my code base. The IFoo process needs to be moved onto a different system (a difference of x64 vs x32), this is our reason for using WFC. My WCF service implements this int...

The right way to create WCF service references?

Hi All, I have a self hosted TCP based WCF service. I am now building a project that consumes that service, but there seems to be at least two ways of adding a service reference to a project and the both produce wildly different proxies. First I used the "Add service reference" from the project menu, but this generated quite a few files...

WCF Error 109: here was an error reading from the pipe. The pipe is closed on the client side

Hi, I am getting the following error on my client app There was an error reading from the pipe: De pipe is beëindigd. (109,0x6d). when using a specific implementation of my OperationContract. The following is a sample cut down to the point. My DataContracts as like this: [DataContract] public class Person { [DataMember] pub...

WCF - Cannot Find the x.509 Certificate Using the Following Search Criteria

Ok, I have seen several questions related to this issue, and I have tried a lot of the ideas presented in them with no success. Here's my situation: I'm hitting a web service over my company's intranet. I have used svcutil.exe to generate the client class for WCF. I was able to run the web service call with no problem when the service w...

How to force a .net WCF client to use NTLM in an basicHttpBinding?

right now I have the security node defined like this: <security mode="TransportCredentialOnly"> transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> Im getting the following error: The HTTP request is unauthorized w...

How can I create 'smarter' (ie typed checked/readonly properties) Client DataContract objects?

I'm quite stuck on one part of using WCF for a client/server messaging system, and would very much appreciate some help. On the server, I've got a Message DataContract object where one of the properties points to a typed collection of MessageBody DataContracts. A stripped down version of the class looks like this: [DataContract] class...

How to consume WCF web service through URL at run time?

Hi, I want to access all the methods exposed in the service through the URL. if suppose the URL will be : http://localhost/MyService/MyService.svc How can I access methods: if suppose I have a ServiceReference and what should I do if don't have the Service Reference. ...

How to authenticate client while consuming the WCF web service ?

I want to authenticate a client while consuming a Web service. I see a property exposed in the Client called ClientCredential in which we can pass username and password. How can I pass this information to my WCF web service and how can i authenticate the user ID and password? ...

What is the difference between WCF Service application and WCF Service library?

Hi, I am developing WCF web service and I used WCF Service application to do that.Is that creating "WCF Service application" fulfill this requirement. and above all what are the advantage of creating WCF Service Library over WCF Service application? ...

Where to trap failed connection on WCF calling class?

I'm trying to write a class that encapsulates WCF calls (the client is Silverlight, if it matters). It all works swimmingly, but I'm not sure how to trap a connection failure, as if the server won't respond. It would appear that bit of work happens somewhere in the resulting code from ChannelFactory, but I'm not sure. General code review...

accessing WCF service through URL

I have a WCF service ( Let's say WCFService1 ) is deployed on two remote machines. Since the same service is deployed on two different machines they have common interface and common methods exposed. WCFService1 is deployed on Machine1 and Machine2. To consume WCF service from client machine, I have created a client app: I have added ...

Intercept messages in a WCF Client

Has anyone got any experience with Web Service Extensions? Been a late day and have spent the past few hours scratching my head trying to make a web service extension from the MS examples. I have an .net 3.5 web service client, built by adding a reference to the wsdl, via the VS IDE "Project > Add Service Reference". This built my web...

WCF: How to get configuration from binding?

I have instantiated a WCF binding in code: var binding = new WSHttpBinding(); binding.Secuity.Mode = SecurityMode.Transport; Is there a way (in code) to get its equivalent configuration? For the above I would expect: <wsHttpBinding> <binding name="NewBinding0"> <security mode="Transport" /> <...

WCF client connection issue

I am using VSTS2008 + C# + .Net 3.5 to develop WCF service hosted in IIS. Then I generate client proxy code automatically by using Add Service Reference function from VSTS 2008. My question is, suppose I create a client proxy instance, then use this specific instance to call various methods exposed by WCF service at server side. Then, e...

How to add a service reference to a WCF client for a web service requiring client authentication certificate

Caution, WCF noobie alert I need to create a WCF client to query a non-WCF web service. The web service is not a WCF service. Additionally, the web service requires a client authentication certificate. Now, I have the certificate, and can create a non-WCF client that works perfectly; I was able to 'Add Web Reference' and a certificate...

WCF Client Dynamic Proxy Pattern

To consume WCF services, we dynamically create channels using the following pattern. Dim subscriptionsService As ISubscriptionsService = ProfileChannelFactory.Create(Of ISubscriptionsService)() Dim result As Subscription() = Nothing Try result = subscriptionsService.GetSubscriptions(New GetSubscriptionsRequest()).Sub...

Duplex binding possible with ONE incoming port in WCF?

Hello everyone, Is duplex binding possible with having ONE single port open for incoming connections in WCF? quoted from another question in SO... "I am making a business specific messaging application, it is going to connect between 5000 and 10,000 machines back to our datacenter via WCF (no vpns, all over the net). It is mainly for al...

WCF WebInvoke problem getting WSDL

Hi, i got a webservicedefinition like this: [OperationContract] [FaultContract(typeof(Exception))] [WebInvoke(ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Xml)] SearchResponse SearchXML(SearchRequest req); and a Service config ...

Authentification in WCF service.

I have a WCF service deployed on another machine and I want to authenticate the client against the WCF service. I have done the following things : 1) In IIS I have unchecked the Anonymous access and checked the "Integrated Windows Authenfication" check box. 2) My Web config <authentication mode="Windows" /> <bindings> <basicH...