Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Answers » Contracts   (RSS)

Setting the Configuration Name

What's the difference between the Name and ConfigurationName on service contracts and behaviors? The Name property sets the name of the service in metadata while the ConfigurationName property sets the name of the service in configuration. Metadata is

Private Data Members

Why does a data contract with private or internal members generate a proxy with public fields? The obvious answer is that the representation for data contracts doesn't contain information about member visibility but that just leads to the question of

Configuring Protection Level

Is it possible to configure the protection level for message parts at runtime? Only certain configurations make doing this particularly easy. When using transport security with Windows credentials, the WindowsStreamSecurityBindingElement allows you to

Differences in Guid Serialization

Why do the guids in my contract turn into strings when generating a client? You're probably mixing different types of serializers between the client and service. There's nothing wrong with this and the generated client will work correctly but you don't

Importing and Exporting WSDL Annotations

How do I add custom annotations to the contracts that are generated from WSDL? You first need to start with an IWsdlImportExtension. Your extension gets called each time a contract is discovered during import. Processing happens in multiple passes so

Detecting Metadata

How do I figure out during dispatch whether a request is destined to be a metadata request or a normal application request? The reason you might care whether a request in flight is for metadata or not is because of security policy. You might want to permit

Ignoring Bad Requests

I have a one-way operation that processes requests and can sometimes fail. When the operation fails, the client receives a fault notification. How can I make the operation ignore the bad requests and not send back a fault notification? This question indicates
Posted by Nicholas Allen | 3 Comments
Filed under: , ,

Metadata is Locked

Why aren't the changes that I programmatically make to the service contract reflected in the downloaded metadata? This is another common question around the confusion between the design time behavior and run time behavior of the system. The configuration
Posted by Nicholas Allen | 2 Comments
Filed under: , ,

Creating Sessions over HTTP

I've got a sessionful contract that I want to use with HTTP. How do I get the HTTP transport to produce a sessionful channel shape? The basic design principle of channels is that they produce whatever channel shape is their natural message exchange pattern.

Serializing UniqueId

Why can't UniqueId be serialized? Data contracts only have native support for a limited set of types. If you use a type that is not in this native set, then you'll get an exception that the data contract is invalid unless you decorate the type with attributes

Revealing the Hierarchy

I have a hierarchy of types that I'm using in service data contracts. When I change the service implementation, sometimes this shifts things so that a different set of the base classes and derived classes are exposed by the service. How do I present a

Data Contract and Message Contract

I have an existing web service that I need to replace with a WCF web service. How do I choose between using a data contract and a message contract? There are actually three choices to consider for describing the messages that your service uses: data contracts,
 
Page view tracker