wcf-binding

Manipulating the HTTP header in WCF before HTTP authentication in HttpBinding

This is in relation to this question I am hosting this WCF service in a custom service host. IIS is not an option. Is there a way to inject an HTTP "Authenticate" header in the server stack (if it's missing) early on in the request process - such that a default user can be passed into the authentication/authorization process that I ha...

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

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). Howe...

Timeouts WCF Services

How do the timeouts work in WCF? I know for example that you can configure sendTimeout and receiveTimeout for a clients binding. But how do they work? Msdn describes sendTimeout as: A TimeSpan value that specifies the interval of time provided for a send operation to complete. This value should be greater than or equal to Zero. The defau...

WCF Bindings - so many! How do I choose one?

We have an R Server (R is a programming language used in statistical analysis) that basically takes a script and a csv file, processes some data and returns results as text. I need to write a service on the R server so that .net clients (could be .Net Windows Forms, or ASP.Net) can connect to the R server, submit the script and CSV fil...

WCF behind load balancer - how to setup

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 AddressFil...

WCF error: The caller was not authenticated by the service

Hi, Trying to access my WCF on a server from my client console application for testing. I am getting the error: The caller was not authenticated by the service I am using wsHttpBinding. I'm not sure what kind of authenicating it is expecting? <be...

WCF Server/Client connection handling

Hi everyone, I'm having some problems with my WCF server and client connections. If I use my service and client normally, meaning my client connects and disconnects thru normal operations (myclient.Close()) everything works fine. But in the instance that I have the server running and I use the visual studio "Stop" button to exit my cl...

msmq with multiple endpoints and concurrent processing

I have built a WCF load balancer/router to conditionally route any one way service to multiple endpoints all using MSMQ bindings. I have also created a host that uses all the endpoints from the router to accept the service calls. All the endpoint specifies the same contract. I need each queue (endpoint) to be processed concurrently ...

How can I make Named Pipe binding reconnect automatically in WCF

I'm writing a service that will only get calls from the local host. Performance is important so I thought I'd try the NetNamedPipeBinding instead of NetTcpBinding and see If I could see any noticeable performance gains. If a client, after having performed one or more requests to the server, is idle for a longer period of time the next r...

Could not find default endpoint element

I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error: Could not find default endpoint element that references contract 'IMySOAPWebService' in the service model client configuaration section. This might be because no configuaration file was found for your app...

WCF: How to get Binding object from configuration

I would like to get Binding object from web.config or app.config. So, this code works: wcfTestClient = new TestServiceClient("my_endpoint", Url + "/TestService.svc"); but I would like to do the following: Binding binding = DoSomething(); wcfTestClient = new TestServiceClient(binding, Url + "/TestService.svc"); I am interested in D...

Can you achieve encrypted bi-directional communication using WCF when the client can be behind a proxy,a firewall or a NAT ?

I have a client and a server both written in .net 3.5 so I've got no interoperability issues. The server is fully accessible on port 443 (I'm hosting it so I can open other ports if needed) The client is however less accessible. It's often behind a corporate firewall, or behind a NAT, or uses an http/https proxy to connect to the inter...

How to get the IP address of a WCF remote endpoint ?

Is there a way to get the remote IP Address of a WCF connection? I guess the reason why it's not built-in into the WCF framework is that WCF can work with non TCP/IP bindings, so the IP Address is not always meaningful. However, the information would make sense for all the widely used bindings (As far as I know : BasicHttp, DualHttp, W...

How do you configure a WCF service for clients running on networked machines?

I’ve just created a WCF service/client and it all works fine when running on the same machine. But can’t figure out how to configure it to run on different machines. Do you know how? At the moment the URI is set to http://localHost:8000...... But I think I want something like net.tcp://MyServer:8000….. Any ideas would be great. Than...

How do you determine the values in a binding?

I have defined a binding that I use to connect to two different services. One I call my Master service that provides configuration information to my program and tells it which Local service to connect to. The Local service returns, along with other things, items that allow me to draw map lines and an MP3 as a file stream. The MP3 can...

Benefits & pitfalls of moving to IIS 7, Windows Server 2008 for WCF Services

We're currently using IIS 6 and Windows Server 2003 for our web and application servers. Our web servers make WCF Service calls to our application servers. We'd like to move to IIS 7 and Windows Server 2008 so that we can use the recommended netTcpBinding (at the moment we're using a basicHttpBinding). (along with this we'd also move f...

Can a .net project discover and use a WCF service?

I have created a basic WCF service in IIS. I am aware that this should be developed in .net 3.0 and .net 3.5. My question is this. Can a client running .net 2.0 access and consume the WCF service? Cheers ...

netTcpBinding - Pending Security Sessions

I've got an internal service hosted over tcp. It's being self-hosted inside of a windows service. The service works fine for the most part, but once in awhile I'll get a bunch of exceptions (all in a row) from it. System.ServiceModel.Security.SecuritySessionServerSettings.AddPendingSession(UniqueId sessionId, IServerReliableChannelBin...

Customer WCF Bindings / Binding Elements For Encryption

I am trying to implement encryption for my WCF service. I am aware that there are several options out there for me to do this. I am not interested in them. I would like to use a password to regenerate repeatable RSA keys. These keys will then be used to exchanged AES keys which will be used to encrypted the actual passed data. I think I...

Maximum array length quota

;Im writing a small WCF/WPF app to resize images but WCF is giving me grief when I try to send an image of size 28K to my service from the client. The service works fine when I send it smaller images. I immediately assumed that this was a configuration issue and I've trawled the web looking at posts regarding the MaxArrayLength property ...