Schema Errors Extending Configuration

After adding a custom binding element to configuration as a binding element extension, Visual Studio reports any use of the binding element in app.config as a schema violation. Is something wrong with the binding element? No, as long as the binding is able to be instantiated when you run the service you know that the…

1

Fix for Generating Metadata Behind a Router

When generating metadata to describe a service, an address is published for the location at which the service can be reached. This is the address to which a client of the service should address a message. Ordinarily, the metadata address is obtained by looking at the address at which the service is listening for messages….

0

Finding Your Place

How do I examine the settings for the endpoint that the message for the current operation was delivered to? There are two sources of settings depending on whether you’re interested in the endpoint runtime settings or the endpoint description. The endpoint description is the blueprint from which the endpoint was built. The endpoint runtime is…

0

Referring to Generic Interfaces in Contracts

How do I write a contract type that has a generic parameter in a service configuration file? A contract reference is part of the template for defining a service endpoint through configuration: <endpoint address=”…” binding=”…” contract=”…” /> Now, you need to fill in the contract value based on the full name of the service contract…

4

ServiceHostBase Never Calls ApplyConfiguration

The ServiceHost class is the primary host for running services programmed using the WCF service programming model. Some of the features exposed by ServiceHost include configuration, service description, and endpoint management to control how the service operates. A base class for ServiceHost, called ServiceHostBase, contains a portion of those exposed features and allows you to…

1

Changes to Default Throttle Settings

I buried this in a previous update on changes in .Net 4 but here’s a more prominent description of how service throttles have changed. The ServiceThrottlingBehavior allows you to configure three settings that limit the resource consumption of a service. MaxConcurrentInstances limits the total number of copies of the service that will be instantiated to…

0

Fix for HTTP Configuration Errors using WebScriptEnablingBehavior

I’ve sufficiently recovered from running the last week-long series covering fixes for WCF to do another one. This week I’ll again be covering fixes for WCF that may be hard to find and explaining the details behind each problem. When using the WebScriptEnablingBehavior to create an AJAX service, the service endpoint is given an accompanying…

0

Fix to Generate Contract Code for Dates

Here’s a bonus entry left from last week. Last week I ran a series covering fixes for WCF that may be hard to find and explaining the details behind each problem. Contract code generation takes a system-independent description of the types used for a messaging operation and generates source code instructions for working with those…

4

Fix for Exception Reading Typed Headers

This week I’ll be running a series covering fixes for WCF that may be hard to find and explaining the details behind each problem. The dispatch operation formatter is the component that deserializes a message into objects. When building the objects out of the message headers in the message, the implementation of the operation formatters…

4

Transaction Not Available

Can I run code under a flowed-in transaction from within a message inspector? The setup work for the service transaction is done shortly before the actual call to the implementation of the service operation. The service transaction is not guaranteed to be available for any of these extensibility points (although for certain kinds of transacted…

0