wcf-binding

How can I set the receiveTimeout and sendTimeout to infinity with this WCF contact?

戏子无情 提交于 2019-12-04 22:44:22
I have the following app.config in my Host: <services> <service name="DCC_Service.DCCService" behaviorConfiguration="serviceBehavior"> <endpoint binding="netNamedPipeBinding" contract="DCC_Service.IDCCService" address="DCCService" /> <endpoint binding="mexNamedPipeBinding" contract="IMetadataExchange" address="mex" /> <host> <baseAddresses> <add baseAddress="net.pipe://localhost/"/> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="serviceBehavior"> <serviceMetadata httpGetEnabled="false"/> </behavior> </serviceBehaviors> </behaviors> How do I set

WCF Error : 'It is likely that certificate 'my cert' may not have a private key that is capable of key exchange

微笑、不失礼 提交于 2019-12-04 22:42:44
I have a WCF service I'm trying to host on our production web server (IIS6). I've set the web up and tied our cert to the web. When I try to browse to the service url, I receive the following error in the event log : The exception message is: It is likely that certificate 'CN= .mydomain, OU=Secure Link SSL Wildcard, OU=I.T., C=US' may not have a private key that is capable of key exchange or the process may not have access rights for the private key. Please see inner exception for detail.. ---> System.ArgumentException: It is likely that certificate 'CN= .mydomain.com, OU=Secure Link SSL

Why is my WCF Service not loading my Binding config?

北城以北 提交于 2019-12-04 20:51:54
问题 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"/> <

How to use HTTPS with WCF SessionMode.Required - simplest possible example

梦想的初衷 提交于 2019-12-04 20:13:20
UPDATE (8/7/2014) - The solution to this problem was that I needed to add a class that derived from "UserNamePasswordValidator" and register it in Web.Config. I have created a simple test WCF service and test console client application (see below for code). I am using .NET 4.5.1. I have already searched for duplicates on StackOverflow (found similar posts here and here ) - however I feel that the referenced posts are potentially outdated, and also feel that my post is more limited in scope. OK now for the example: The solution currently uses sessions (in ITestService.cs): [ServiceContract

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

时光总嘲笑我的痴心妄想 提交于 2019-12-04 15:49:51
问题 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. 回答1: Got the answer in MSDN forums : static void RunService() { //Step1:

How do you configure WCF to support FaultContracts where both the host and client are in the same process using a net.pipe?

笑着哭i 提交于 2019-12-04 10:53:11
I'm trying to create an in-process unit test for my service to client interactions using net.pipe binding. Like a good WCF service it uses FaultContractAttribute on service operations to expose possible faults (wrapped exceptions) to metadata. I would like to have the client and service endpoints configured thru XML (App.config). However, whenever a fault is thrown, it's just a CommunicationException "pipe has closed", and not the typed Fault I was expecting. System.ServiceModel.CommunicationException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d). I tried

WCF binding configuration apply only as default but as named it fails

孤街浪徒 提交于 2019-12-04 10:06:51
We have an interesting problem with WCF binding and streaming transfer mode that we cannot solve: We have an WCF endpoint configured to the streaming transfer mode. The endpoint receives message much larger then the default size (~65 KB). Therefore we have specified larger message size in the maxReceivedMessageSize attribute on the binding tag. The problem is when we pair up the endpoint and the binding by the bindingConfiguration attribute on the endpoint tag and the name attribute on the binding tag, we receive the following error: "The remote server returned an error: (400) Bad Request". As

WCF: Call Service using parameter in URL with &

冷暖自知 提交于 2019-12-04 05:13:54
I have my WCF service with URL template like.. http://localhost:8448/service/SearchProduct/{productid}/{categoryid}/{search}/{pageSize} /{currPage} Here, I want to call this service path by using & parameters in the URL, like.. http://localhost:8448/service/SearchProduct/?productid=10&categoryid=34&search=newproducts&pageSize=10&currPage=5 But when I call service using above path, I got the exception "Endpoint not found." Could you please tell me How would I call this service by using passing parameter in the URL with &categoryid=10&currPage=10 ?? Thanks in Advance! Try to modify your URI

How to override WebServiceHostFactory MaxReceivedMessageSize?

时光怂恿深爱的人放手 提交于 2019-12-04 04:52:50
There are a lot of similar questions out there, but I have tried every solution in every one of them to no avail. We have a web service that initialises with WebServiceHostFactory, but if any more than 64k is thrown at it, we get a '400 Bad Request'. Normally, this would just be resolved by bumping up the MaxReceivedMessageSize, MaxBufferSize and MaxBufferPoolSize. The problem is that using the WebServiceHostFactory, the Web.Config is completely ignored. No changes I make in the ServiceModel section reflect in the service at all. It would be nice to just completely ditch WebServiceHostFactory

Help to choose a binding(WCF)

柔情痞子 提交于 2019-12-03 21:51:20
问题 I need to create WCF Application, which will be working with pictures. It allows you to get a picture as a stream, and to send a picture to server (as a stream). It will work in streaming transfer mode. At the moment I hesitate over this choise. BasicHttpBinding or NetTcpBinding? What differences are between them? Advantages and disadvantages. Which will be better for this problem? 回答1: Check out this blog post (or many other, similar ones) The diagram to choose the proper binding is from