wcf-binding

Create XML representation of WCF binding instance

点点圈 提交于 2019-12-08 07:14:39
问题 I'm trying to write code to convert a WCF wsHttpBinding to customBinding, using the method described on WSHttpBinding.CreateBindingElements Method . Binding wsHttpBinding = ... BindingElementCollection beCollection = originalBinding.CreateBindingElements(); foreach (var element in beCollection) { customBinding.Elements.Add(element); } Once I have generated the custom binding, I want to generate an XML representation for that new custom binding. (The same XML representation that's found in an

WCF Service on IIS. How to get rid of the “Service.svc” component in the URL path?

坚强是说给别人听的谎言 提交于 2019-12-08 06:49:54
问题 I have a WCF Service hosted on IIS. For business reason I cannot post the public URL of this instance, but I'm sure you will get what I mean: The problem is that in order to reach my endpoint it seems I have include the Service.svc as part of the path segment , i.e., I have to use URLs like this: http://<domain>/<app-name>/Service.svc/<relative-path> How can I avoid this? I mean, I'd like to access my service simply with: http://<domain>/<app-name>/<relative-path> I was perfectly able to do

Problem authenticating with WCF service cross domain

吃可爱长大的小学妹 提交于 2019-12-08 06:09:02
问题 I'm new to WCF and its security so was looking for some help on a problem I'm having. I have a WCF service that to be deployed to every machine in a small domain. The WCF service is to be hosted in a Windows Service since it has methods in it that need to be invoked elevated. The service is very draft at the moment (it exposes meta-data - but I believe this is to be turned off later - is this possible?). It uses the net.tcp binding - The App.Config of the service is shown below: <?xml version

UsernameToken and SSL in WCF 4 web service

扶醉桌前 提交于 2019-12-08 06:01:49
问题 I am creating a web service that will be consumed by a single client in another part of the world. I don't have any knowledge or control over the technology they are using but have been asked to "use SSL to encrypt the message during transport and use UsernameToken for client authentication" I'm planning to use WCF4 to create the service and know generally how to set this all up. However I'm struggling to find the correct configuration for bindings etc. Google gives me lots of results around

How Can I access WCF services using a Web Reference?

℡╲_俬逩灬. 提交于 2019-12-08 04:32:46
问题 What WCF configuration settings makes WCF service, so that I can access as old ASMX web services? How can I authenticate using Authentication header what I used in Old ASMX web services? 回答1: Just use basicHttpBinding Here is an example of the configuration: http://msdn.microsoft.com/en-us/library/ms731347.aspx 回答2: Check this out : ASMX to WCF migration 来源: https://stackoverflow.com/questions/1661340/how-can-i-access-wcf-services-using-a-web-reference

Custom Headers in WCF

孤人 提交于 2019-12-08 04:30:18
问题 I've want to add specific custom headers on my wsdl for incoming soap message so i've added the required tags into the header node of the web.config like below: <headers> <Tag>Value</Tag> </headers> However, this works fine if the 'Value' in the custom tag is set to 'Value' when I change this value the service kicks it out giving the below error; 'DestinationUnreachable - The message with To 'http://localhost:3537/Service1.svc' cannot be processed at the receiver, due to an AddressFilter

WCF: relativeAddress,baseAddress and binding

﹥>﹥吖頭↗ 提交于 2019-12-07 17:14:11
问题 I am new in WCF and start my experience with a simple file-less application part of which (web.config) you can see below: <serviceHostingEnvironment multipleSiteBindingsEnabled="true"> <serviceActivations> <add factory="System.ServiceModel.Activation.ServiceHostFactory" relativeAddress="./RelativeAddress.svc" service="WCF_Transactions.MyService1"/> </serviceActivations> </serviceHostingEnvironment> Now I can access service at http://localhost:18148/RelativeAddress.svc Then I add next lines:

Running Multiple Services Over net.pipe in WCF

守給你的承諾、 提交于 2019-12-07 09:22:52
问题 I am building a distributed application that will require 6 different services. I will have to demo the application on my XP laptop using Visual Studio 2008. Is it possible to run multiple services on localhost at the same time, all using net.pipe? For example: net.pipe://localhost/DirectoryService net.pipe://localhost/MathService If not, is there any other way to host these WCF services without using IIS/webdev server? net.tcp? Something else? 回答1: Yes, providing the binding addresses are

Hiding my WCF service?

戏子无情 提交于 2019-12-07 07:51:02
问题 I have a WCF service hosted on IIS6 and I am using .net framework 3.5. The site I have is on public domain I mean anybody can access from anywhere. My question is, is there a way to hide my WCF service? I can easily view source my page or know exactly the the path of my service behind the page... http://hostname.MyServiceName.svc?wsdl , how can I hide it? 回答1: Agreeing with David that just "obscuring" your service is less than half the solution, you can of course turn off service metadata

wcf exposing generics

不羁的心 提交于 2019-12-07 04:51:02
问题 I have an application where client and server share types, and interoperability is not one of our concerns. I am planning to have a single repository for all web enabled objects, and i was thinking of a generic interface for my exposed service. something like T GetObject(int id) but wcf doesnt like it since its trying to expose its schema (which i dont really care about) is it possible to do such a thing with WCF ?, i can use any type of binding doesnt have to be httpbinding or wsbinding...