Welcome to MSDN Blogs Sign in | Join | Help

November 2006 - Posts

Proxy Bypassing Behavior

The HTTP transport and binding element have three settings for controlling the proxy behavior. public bool BypassProxyOnLocal { get; set; } public Uri ProxyAddress { get; set; } public bool UseDefaultWebProxy { get; set; } UseDefaultWebProxy controls
Posted by Nicholas Allen | 3 Comments
Filed under: , , ,

Format for Configuring HTTP and TCP Activation

IIS uses some inscrutable strings to configure the activatable bindings of a web site. Here's the minimum you need to interpret a binding and get started working with activation. Activation is controlled by the activationHost.config file. In the list

Controlling the Synchronization Context

The synchronization context is invisible state that flows around making sure that the proper threading model is being used with requests. Windows Forms applications, for example, require that calls be made on a particular thread and the synchronization
Posted by Nicholas Allen | 3 Comments
Filed under: , ,

Mixing Message Contract Attributes

What's wrong with the following code? The error message when you try this is better than it used to be a few months ago. However, since you don't see the error until you try to run your service, I still see people making this mistake. [MessageContract]
Posted by Nicholas Allen | 5 Comments
Filed under: , ,

Dangers of Application Domain Recycling

Secure calls to a hosted service are intermittently failing with the following error message: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. The inner exception
Posted by Nicholas Allen | 1 Comments
Filed under: , , ,

Tuning Service Throttles

The first step in tuning a service is figuring out which throttles should be adjusted. The default throttle values for WCF are extremely conservative out of the box, meaning that you almost always will be tuning throttle values upwards. This also means
Posted by Nicholas Allen | 1 Comments
Filed under: ,

Slight Style Change

During the server upgrade a while back, there was a settings change that caused wide content to get cut off rather than displaying scroll bars. There pretty frequently are some long lines in the code samples that won't fit on the average display. I guess
Posted by Nicholas Allen | 0 Comments
Filed under:

Getting the Client's Password

I'm writing a middle-tier service that needs to act as the client. I can get the user name from the client credentials but the password isn't available. How do I get the client's password? Most reputable security systems never give the service access
Posted by Nicholas Allen | 2 Comments
Filed under: , ,

Light Week Coming Up

Due to the holidays, there will be no posts on Thursday or Friday of next week. There will be posts Monday through Wednesday, but I may not always be approving/responding to comments or answering email until the week after.
Posted by Nicholas Allen | 0 Comments
Filed under:

Building a Secure Composite Duplex

I'm getting this error message even though I have security enabled for my service: Unhandled Exception: System.InvalidOperationException: The response message must be protected. This is required by an operation of the contract ('ICalculator', 'http://Microsoft.ServiceModel.Samples').

Modifying the Binding of a Service

It's occasionally useful to be able to replace the binding being used for an existing service host. For example, if the binding was loaded from configuration, you may then want to have your code examine the binding and modify some of the settings. This
Posted by Nicholas Allen | 2 Comments
Filed under: , ,

Splitting Up XML Text Nodes

Will the XML DOM I get from a message exactly match the XML DOM that was originally sent? This isn't a real question I've seen, but it's often hidden inside of another question. For example, there are people that extract content from an XML document by
Posted by Nicholas Allen | 2 Comments
Filed under: , ,

How to Configure MaxItemsInObjectGraph

I've been told that I'm exceeding the maximum number of items that can be serialized or deserialized. Where is this MaxItemsInObjectGraph setting? I can't find it anywhere. MaxItemsInObjectGraph looks like a message encoder setting but you won't find
Posted by Nicholas Allen | 1 Comments
Filed under: ,

Handling Message Encoder Errors

This time it's two questions that have the same answer. What contract does the message encoder have for producing a message from ReadMessage? What should the transport do if the message encoder doesn't produce a message from the buffer you give it? The

Transacted WaitForMessage Illustrated

I didn't originally intend to draw out the picture corresponding to TryReceive and WaitForMessage in the presence of transactions . However, I had just upgraded Office 2007 to the final version and I wanted to make sure that everything was still working.
Posted by Nicholas Allen | 0 Comments
Filed under: ,

When to Wait for Messages

When you call receive on a channel, there is always a timeout that bounds that receive operation. There are actually three different kinds of receive on the standard input channel shape. The Receive method waits for a message to arrive up to the timeout
Posted by Nicholas Allen | 6 Comments
Filed under: ,

Who's Talking About .Net 3.0 Shipping?

I was home sick yesterday, so after publishing the WCF RTM announcement , I decided to flip through and read everyone else on MSDN that published a similar announcement. Here's the list I came up with. The order is just the order I found them in. The
Posted by Nicholas Allen | 1 Comments
Filed under:

V1 RTM Downloads

After a long wait, WCF V1 is now available! We will of course be shipping with Vista, but the online download is accessible now. Everyone should be upgrading from the beta and RC releases now. Remove any previously installed versions before attempting
Posted by Nicholas Allen | 4 Comments
Filed under: ,

Dealing with SSL Certificate Validation Failures

Here's a quick list of things to try when debugging a non-functioning SSL server certificate. Has the certificate expired or been revoked? Does the MMC Certificate Manager say that the certificate is valid? Is the certificate in the LocalMachine store?

Pull Not Push

There are two architectural models for moving messages through a system. Pull messaging models require the receiver to actively suck messages out of the pipeline in order to achieve flow. If the receiver is not willing to perform work, then there's nothing

The Mixed Mode Addressing Picture

Once again I ended up with a picture laying around after writing yesterday's article on addressing . This picture covers all of the basic addressing cases that I discussed. Bidirectional TCP with anonymous addressing Request-reply HTTP with anonymous
Posted by Nicholas Allen | 1 Comments
Filed under: ,

Mixed Mode Addressing

WCF has a variety of addressing controls for specifying where messages should be sent. For example, there's the To address of the logical endpoint, the Via address of the physical endpoint, the ReplyTo address of the endpoint where the response should
Posted by Nicholas Allen | 5 Comments
Filed under: ,

Design Pattern for Building Channel Factories and Listeners

This is just a style convention that helps you avoid doing some thinking while writing custom channel classes. During the channel construction process, there's a flow of information from the binding (design time), through the channel factory and listener,
 
Page view tracker