wcf-client

How to make WCF Client conform to specific WS-Security

六眼飞鱼酱① 提交于 2019-12-23 19:17:57
问题 I must make my WCF Client consume a web service (IBM DataPower) and sign/encrypt the request using Web Services Security X.509 Certificate Token Profile 1.1 OASIS Standard Specification, 1 February 2006. So far I have created a custom binding and "think" I am working along the right lines: Updated to reflect latest attempt Private Function CreateCustomBinding() As Channels.Binding Dim asbe As New Channels.AsymmetricSecurityBindingElement asbe.MessageSecurityVersion = MessageSecurityVersion

HTTP proxy basic authentication with WCF ChannelBase

别来无恙 提交于 2019-12-23 03:59:18
问题 I'm stuck with a problem of basic authentication to connect a web service which was created, in Visual Studio, deriving from ChannelBase. Already tried to ask in MSDN with no results, so I'm trying my luck over here. This is the scenario: a) the web service requires basic authentication (username and password) and supports SOAP 1.1 b) I have to go through a HTTP proxy which requires, again, basic authentication. I cannot get this to work: the authentication on the web service is fine (if

How to use WCF in Android

雨燕双飞 提交于 2019-12-23 01:54:49
问题 I provide a remote tool to other websites through web service in WCF. Now I want to provide same remote tool to Android Apps. My question is: Can Android apps consume my WCF web services (hosted on webserver) or do I need to change something. 回答1: You have WCF service and you want to consume it from Android application. First of all your service must be interoperable. In case of Android client you should use either basicHttpBinding (SOAP service) or webHttpBinding (REST service). To consume

Exposing meta data for a WCF 4.0 Rest Template Service

ε祈祈猫儿з 提交于 2019-12-22 10:38:06
问题 Probably missing something very basic. I created a WCF 4.0 Rest Service. It works no problems when I'm hitting the url from a browser and I'm getting back what I want. But now I want to use that service from a client mvc application (it will also be used by other non .net platforms which is why it's a rest service in the first place). Problem is how do I get a service reference to it so I can start to use it in my c# code? With the new minimal WCF .net 4 config approach and no interface for

WCF Proxy Using Post Even Though WebGet Attribute is Specified (Only when called from another WCF service) - Causes 405 Error

烈酒焚心 提交于 2019-12-22 08:08:05
问题 I have a Restful WCF service sitting on another server configured with the WebGet attribute to respond to the HTTP Get method. I know the service works correctly because I can call the service directly through the browser and manually do a Get with Fiddler and receive a correct response. I have an Asp.NET project on my local machine that is calling this service with the following code: Proxy Interface 'IProductService': using System.ServiceModel; using System.ServiceModel.Web; namespace Hugo

Do I need to expose a constructor in a WCF DataContract for it to work during object instantiation on the client?

落花浮王杯 提交于 2019-12-22 04:11:55
问题 I have a class in a WCF service, lets call it A . A is a data contract, which contains as one of its DataMembers a collection of another custom object B . To avoid Null Reference problems on the client side, I instantiate the BList in the constructor like so: [DataContract] public class A { [DataMember] public String name { get; set; } [DataMember] public List<B> BList {get; set; } public A() { BList = new List<B>(); } } My problem is that on the client, this instantiation does not happen and

Windows Service Hosted TCP WCF Service

断了今生、忘了曾经 提交于 2019-12-21 19:40:51
问题 I am trying to host a WCF service on a windows 2008 R2 server as a windows service. I followed the directions provided by msdn (found here). Everything works fine as long as everything is part of the same solution in visual studio. However, I tried creating a client in a different solution (on the same machine) and it can't find the service. I get an 'Add Service Reference Error' shown below. My goal is to be able to access the wcf service remotely, but I can't seem to even access it locally

How to add service reference in client project?

廉价感情. 提交于 2019-12-21 18:03:09
问题 I am totally new to WCF so please indicate if you find something that I am doing totally wrong here. I have created a WCF service project (my service class is dervied from ServiceBase class) with endpoint address binding set to basicHttpBinding. Now I need to create a client application that can call some APIs from this service. My quesion is that in my client application how can I add service reference to that service. Do I need to publish this service first under IIS (which mean I have to

Modify SOAP header Mustunderstand attribute in WCF client

◇◆丶佛笑我妖孽 提交于 2019-12-21 06:12:14
问题 I am writing a WCF client for a service (not WCF). Getting an error that Unprocessed 'mustUnderstand' header element: {http://www.w3.org/2005/08/addressing}Action, because request SOAP contains header with mustunderstand='true'. I have to either set it false or remove the whole header. can you show the way to do that? Here is the binding code var transportElement = new HttpsTransportBindingElement(); transportElement.AuthenticationScheme = AuthenticationSchemes.Basic; var messegeElement = new

WCF Proxy Client taking time to create, any cache or singleton solution for it

偶尔善良 提交于 2019-12-20 15:27:17
问题 we have more than dozon of wcf services and being called using TCP binding. There are a lots of calls to same wcf service at various places in code. AdminServiceClient client = FactoryS.AdminServiceClient();// it takes significant time. and client.GetSomeThing(param1); client.Close(); i want to cache the client or produce it from singleton. so that i can save some time, Is it possible? Thx 回答1: Yes, this is possible. You can make the proxy object visible to the entire application, or wrap it