wcf-client

WCF server method - returning DataSet kills output parameters

Looking for some collective wisdom. Here is the situation. This is using Visual Studio 2008. We have a simple WCF contract exposing the following method: DataSet ExecuteQuery (out string someStuff); This method is implemented as: public DataSet ExecuteQuery (out string someStuff) { someStuff = "abc"; return new DataSet(); ...

Using WCF to consume service and receieving varying errors depending on binding configuration

I am attempting to consume an intranet web service with WCF. I added reference to the service via the Add Service Reference feature in VS2008. In doing so I was prompted for network credentials to access the service which I provided and the service reference was added. I then wrote some code that I would expect to fail as it doesn't pas...

WCF service timeout when not started yet.

I have a WCF service that I am self-hosting. It was working fine apart from being slow when the InstanceContextMode was set to PerCall. (the constructor is quite heavy so that makes perfect sense) I set the InstanceContextMode to Single, and now it works fine, after the service has started up. However, if the service is still starting u...

Hosting and Consuming WCF Service from Same Process.

Can you become a client of a WCF Service from with the Process that is hosting the WCF Service? I have tried creating seperate App Domains within the same process and still no success. The service is confirmed to be available on Http, Net.TCP and Net.Pipe. Thank you for any help! Nat ...

How to add custom soap headers in wcf?

Hi, Can I add Custom SOAP header in WCF incomming/outgoing messages in basicHttpBinding, like we can add custome authenticatino header in ASMX web services? Those custome SOAP header should be accessble using .net 2.0/1.1 web service clients (accessible by WSDL.EXE tool) . Thanks nRk ...

Configure WCF endpoint for Plain Old XML (POX)?

Is there anyway to configure WCF endpoint/binding to send the data "as-is" without wrapping as a soap message (with the Envelope tag, etc.)? I'm trying to send an xml using WCF and its ended up wrapped as a soap and i would like that the server side would get it as plain xml (exactly as the original) because i can't change the server s...

How can I get WCF FaultException when server returns an HTTP 401?

I have a WCF based test harness client for a set of web services. The test client allows me to see raw requests and responses going to and from the services. A Message Inspector endpoint behavior is used to "pick off" the raw requests and response messages and save them for later display in the UI. This works great, except for the use ...

Exception while calling an ASP.NET Web Service using WCF

I have a WCF client which calls an ASP.NET web service in a different project. I get the following error message: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction http://localhost/IMyWebService/MeMethod Web Service code: [WebService(Namespace = "http://tempuri.org/")] [WebSe...

WCF Client proxy creation strategy with custom endpoint behavior

I'd like to centralize creation of my WCF proxies in a WPF client application. During creation of each proxy I'd like to define programaticaly specific endpoint behaviors (adding localization headers etc) and define client credential settings (I'm using message level security with UserName client credentials). The creation of proxy shoul...

Solutions for dynamic WCF client proxy in Silverlight?

I currently need to access WCF services from within Silverlight (3.0) application, but I need it dynamic. What I have access to : the service interfaces (ServiceContracts) and data definitions (DataContracts). What I need : runtime generated/created WCF client proxy. Have some solutions? ...

Consuming an IIS WCF through a Windows Service Application

Hey all, I've built my WCF service and published it. I built a Windows application and was able to consume it without a problem (as a service reference). The problem arises when I try to build it as a "class". What I'm trying to do is build a Class library (DLL) that may be instantiated a number of ways. This DLL is going to call the W...

WCF, channel factory, and exceptions

Using vs2008, vb.net, C#, fw 3.5 I am consuming my service in my client Service is hosted in IIS Client(winforms MDI) is generated using svcutil using /l, /r, /ct, & /n switches Service and client both use a MyEntities.dll I am using nettcp with TransportWithMessageCredential I cache the proxy in the main form if Membership.Valida...

WCF:Exception Could not find default endpoint element that references contract 'IService' in the ServiceModel client configuration section. when hosing in IIS

I have a WCF service which is being hosted in IIS.I have a WCF client also (a console application) .I have used the svcutil to build the proxy class and configuration file and then added those to my client project.It builded properly.But when i tried to run the program,ITs throwing me the below exception Could not find default endpoint ...

WCF Exception Handling proxy

I am using the ErrorHandlingProxy from here and had a coupla questions. I noticed that the ExceptionHandlingProxyBase executes all calls in the main thread. What do I need to do to initialize and run in the background? I am using it like in the examples in form load private MyServiceProxy _proxy = null; private void Form1_Load(object...

Accessing WCF service with Integrated Windows Authentication from Windows Service using local SYSTEM account

Hi, We have WCF service using Integrated windows authentication deployed on a dedicated server. There will be Windows Service on Client machines[windows service uses Local System Account].We get an error when the WCFServiceClient in Windows service accesses the WCF service.[If windows service is on server machine it works fine] System....

WCF Duplex Communcation - Call back delegate in client fails to execute until WCF operation is complete

First of all, thank you for reading this and I hope that you can bear with me. I have a rather complex problem here and I am about to turn to Microsoft for some answers. I have written a WCF service that implements the FlexNet API to automatically search an update server for product updates, and installs them on a client's machine if an...

Exception in WCF client

i have using WCF service in my code that the client(WindowsFormsApplication1) capturing desktop view and send it to Server .. After that the Server will send the images to Masterclient(windowsformsApplication2).Its working... but few minutes i got the exception from clientSide as object reference is not to set an instance of an object Ho...

Consuming Java Webservice with Date and Time elements in WCF

I need to consume a Java Webservice which has elements of type Date and Time. Example from the wsdl: ... <xsd:element name="fromTime" nillable="true" type="xsd:time" /> <xsd:element name="dateOfInspection" type="xsd:date" /> ... When consuming the Webservice via Add Service Reference Visual Studio 2008 generates the following code: ...

How to handle incorrect SOAP fault in WCF?

I have to consume to a third-party web service using SOAP. It was easy to get it to work with WCF, but now I have a problem with SOAP faults. The service sends me an incorrect SOAP fault: <?xml version="1.0" encoding="utf-8" ?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV...

WCF client side certificate validation : changing address : identity dns value seems to be ignored

I'm using wsHttpBinding with TransportWithMessageCredential, message clientCredentialType="UserName" Trying to configure my service client to work against my public deployed address, I tested first by changing to "localhost", since localhost is the same IIS instance, just going through loopback instead of my PC's hostname. With loopback...