wcf-client

WCF IClientMessageInspector and the incoming SOAP headers

≡放荡痞女 提交于 2019-12-11 20:14:21
问题 I'm responsible for updating a client-side API using WCF. This is because of changes to the API on the server (an outside company). When I get the response, my client-side throws an exception. Using Fiddler, I came up with the following problem: a duplicate Content-Type. HTTP/1.1 200 OK Date: Thu, 05 Jan 2012 21:15:16 GMT Connection: close Content-Type: text/xml; charset=utf-8 Content-Type: text/xml; charset=UTF-8 Content-Length: 538 ... Using Fiddler, I removed the extra Content-Type, and

How to consume WCF in silverlight app

烂漫一生 提交于 2019-12-11 12:05:40
问题 I want to know how I can consume a normal WCF service (not Silverlight enabled WCF service) in my Silverlight application. Here is what I tried I have created a simple normal WCF service I changed the binding to basicHttpBinding in the web.config file I have placed clientaccesspolicy.xml and crossdomain.xml files in wwwroot folder. But even though I am unable to consume the WCF service. I get this exception System.ServiceModel.CommunicationException was unhandled by user code Message=An error

Dpws web service with event - Wcf client example or suggestions sought

大兔子大兔子 提交于 2019-12-11 11:14:35
问题 My device has a DPWS web service with a single output (wsdl:output) that I need to subscribe to with a Wcf client The client is a regular .Net 4.0 application - not .net-micro-framework. I need an example or tutorial or other resource relating to building such a client to such a service. 'Add Service Reference' produces non-working code, 'Add Web Reference' hangs. The Wsdl is below. If there's any further information required to answer this question please let me know. Many thanks <?xml

WCF change address at runtime exception

女生的网名这么多〃 提交于 2019-12-11 09:10:05
问题 I have a problem connecting to WCF Service with custom endpoint. I have excel addin that communicates with database via WCF Service. I created service and everything works fine. WCF Service is referenced in ServiceReference of my Excel addin project. But now, I want to have an option to set server where WCF service is running. So I let user to input the service URI and I'm trying to create ServiceClient with binding and EndpointAdrress. But if I create ServiceClient with EndPointAddress of

WCF - Informing about the progress to client (Can I use one-way call back methods within a request/reply operation)

纵然是瞬间 提交于 2019-12-11 07:22:22
问题 My contract has request-reply operation which performs multiple tasks. So I would like to inform about the progress of the operation to the client as its a long running operation. So Duplex is the ideal choice as I can use call back methods. But my operation returns results at the end of the operations. So what is the recommendation to solve this problem? Reuest-reply operation and one-way call back method for the progress messaages from the service within the operation? Blocking (request

Error While trying to upload video >50MB using WCF Service

柔情痞子 提交于 2019-12-11 04:13:50
问题 I am recving the exception while i try to upload a file of size grater than 50MB using the WCF service. Following is my Config File: I have used "BASIC HTTP BINDING" <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft

WCF Duplex: How to handle thrown exception in duplex Callback

北战南征 提交于 2019-12-11 03:13:59
问题 How do I handle an exception thrown in a callback method on the client in a WCF duplex setup? Currently, the client does not appear to raise the faulted event (unless I'm monitoring it incorrectly?) but any subsequent to call Ping() using the the client fails with CommunicationException: "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.". How do I deal with this and recreate the client etc? My first question

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

荒凉一梦 提交于 2019-12-10 19:11:00
问题 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 dialog box opened up to allow me to select the appropriate certificate, then went on to create the web reference. Trying to create a WCF client via 'Add Service

How to enable reliability for one-way methods?

ぃ、小莉子 提交于 2019-12-10 18:05:06
问题 The What You Need To Know About One-Way Calls, Callbacks, And Events article tells: The fact that the client doesn't care about the result of the invocation does not mean the client doesn't care if the invocation took place at all. In general, you should turn on reliability for your services, even for one-way calls I've tried to find how can I enable reliability, but didn't find anything meaningful. Could you please help me: How to enable reliability? How to check if one-way method reached

WCF Client with WS-Security

断了今生、忘了曾经 提交于 2019-12-10 11:01:29
问题 I need to implement a WCF client that meets the following SOAP message example: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:msa="http://msa.ebs.health.ontario.ca/" xmlns:idp="http://idp.ebs.health.ontario.ca/" xmlns:edt="http://edt.health.ontario.ca/" xmlns:ebs="http://ebs.health.ontario.ca/"> <soapenv:Header> <ns2:EBS wsu:Id="id-1" xmlns:ns2="http://ebs.health.ontario.ca/" > <SoftwareConformanceKey>444561ee-277f-77b2-c664-7a9923jfgh1b<