wcf-binding

WCF: Multiple binding configurations for a single service

烈酒焚心 提交于 2019-12-03 16:30:00
问题 I'm working on a client-server application (.NET 4 WPF, WCF) that must support backwards compatibility. In other words, old clients should be compatible with new servers (and vice versa) as far as operation contracts and data contracts. Our WCF services are hosted in IIS, and they were set up to use basicHttpBinding: <basicHttpBinding> <binding name="basicHttpBinding_Configuration" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647"

WCF behind load balancer - how to setup

白昼怎懂夜的黑 提交于 2019-12-03 16:18:00
We have a couple of web servers using load balancer. Machines are running IIS6 on port 81. Externally, site is accessable using port 80. External name and name of the machine are different. We're getting System.ServiceModel.EndpointNotFoundException: The message with To '<url>' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree. Relevant part of web.config is: <endpoint binding="ws2007HttpBinding" bindingConfiguration="MyServiceBinding" contract="MyService.IMyService" listenUriMode=

Why is my WCF Service not loading my Binding config?

て烟熏妆下的殇ゞ 提交于 2019-12-03 12:23:10
I have the problem with the following error: " The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. " So I did some research and found that I needed to increase the buffer and message size, here's my WCF Service config file: <system.serviceModel> <bindings> <wsHttpBinding> <binding name="default" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"/> </wsHttpBinding> </bindings> <services> <service name="WCF.Service.Service"> <endpoint address="ws" name=

How do I create a simple Web Server using WCF without the ServiceHost class?

落爺英雄遲暮 提交于 2019-12-03 10:01:15
I've began to learn WCF and wish to understand its internals by creating a simple Web server using channel stacks directly. I have found a lot of theory in the web but I'd like to see a working sample code of receiving and responding an httprequest that I can test using any browser. I'm hoping for something that shows the setup of a custom binding by assembling binding elements all the way to responding the request. Got the answer in MSDN forums : static void RunService() { //Step1: Create a custom binding with just TCP. BindingElement[] bindingElements = new BindingElement[2]; bindingElements

bindingConfiguration vs bindingName

前提是你 提交于 2019-12-03 09:49:19
What exactly is the difference between bindingConfiguration and bindingName elements in a WCF endpoint element? The reason that I ask is I am creating an endpoint which uses basicHttpBinding and SSL. I configured the web.config like this: <basicHttpBinding> <binding name="basicHttps"> <security mode="Transport"> <transport clientCredentialType="None"/> </security> </binding> <endpoint binding="basicHttpBinding" bindingConfiguration="basicHttps" contract="Hsp.Services.Interface.Catalog.ICatalogService" address="" /> However, when using bindingConfiguration then https isn't working. When I

Deploying WCF Service with both http and https bindings/endpoints

不羁的心 提交于 2019-12-03 06:41:13
问题 I've written a WCF web service for consumption by a Silverlight app. Initially, the service only required a basic http binding. We now need to be able to deploy the service for use under both http and https. I've found some settings for web.config that allow me to do this as follows: <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="SilverlightFaultBehavior"> <silverlightFaults /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="CxtMappingWebService

WCF: Multiple binding configurations for a single service

梦想与她 提交于 2019-12-03 05:35:46
I'm working on a client-server application (.NET 4 WPF, WCF) that must support backwards compatibility. In other words, old clients should be compatible with new servers (and vice versa) as far as operation contracts and data contracts. Our WCF services are hosted in IIS, and they were set up to use basicHttpBinding: <basicHttpBinding> <binding name="basicHttpBinding_Configuration" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" /> <security mode="None" /> </binding> <

How can I programmatically create this custom binding?

这一生的挚爱 提交于 2019-12-03 02:46:33
问题 We've got to access a web service that uses soap11... no problem I'll just set the binding as: BasicHttpBinding wsBinding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential); Nope. No dice. So I asked the host of the service why we're having authentication issues and he said that our config needed to have this custom binding: <bindings> <customBinding> <binding name="lbinding"> <security authenticationMode="UserNameOverTransport" messageSecurityVersion=

How can I programmatically create this custom binding?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 16:21:05
We've got to access a web service that uses soap11... no problem I'll just set the binding as: BasicHttpBinding wsBinding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential); Nope. No dice. So I asked the host of the service why we're having authentication issues and he said that our config needed to have this custom binding: <bindings> <customBinding> <binding name="lbinding"> <security authenticationMode="UserNameOverTransport" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11" securityHeaderLayout="Strict"

Enable MEX in a Web.Config

本小妞迷上赌 提交于 2019-12-02 05:17:19
问题 How do I enable/create a MEX endpoint in the below web config so I can view the service from my browser? I have tried a few variation from googling but VS always complains about it. (not a valid child element etc...) <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <services> <service name="MyApp.MyService" behaviorConfiguration="WebServiceBehavior"> <endpoint