Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Answers   (RSS)

Interfaces Lack Data

Why does having two known types blow up for being conflicting data contract types if the types are two different interfaces? An interface only contains declarations for its members. The interface doesn't contain any data fields and any implementation

Building a Data Contract Serializer Behavior

In configuration there's a DataContractSerializer behavior that I can add to my service, but the class it uses is internal. How do I get the same behavior programmatically? The DataContractSerializer behavior is a shortcut for setting the MaxItemsInObjectGraph

Finding CLR Types from Schema

How can I found out what CLR type a particular XML schema definition will map to when using data contracts? Ask the type system what type it thinks the schema will map to. static string ClrTypeForXmlType(XmlQualifiedName xmlType) { return new XsdDataContractImporter().GetCodeTypeReference(xmlType).BaseType;

Order Best Practices

Why is setting the Order property on data members recommended when adding fields in a new version of the contract? The data contract versioning best practices recommend taking three steps when adding fields in a new version of a contract. The first recommendation

Transfer Modes and Buffer Sizes

Why do only some of the bindings allow setting a MaxBufferSize? The maximum buffer size and the maximum received message size are in many ways linked together. If the message is being transferred in a single buffer, then it only makes sense for the largest
Posted by Nicholas Allen | 0 Comments
Filed under: , ,

Nothing to See Here

What is the System.ServiceModel.Channels.NullMessage used for? The Message class is a central abstraction for representing communication between two endpoints. There's often interesting information associated with a message, such as the message delivery
Posted by Nicholas Allen | 0 Comments
Filed under: , ,

Data Deserialization Order

Why are the members of a data contract expected in a particular order in order to be read? The order of members is frequently used to build an expectation of what element might be appearing next. Knowing the possible order of data instead of potentially

Overriding Namespaces from Serialization

I’ve defined my own XML namespaces for the members of a data contract and now when I generate the client proxies I get some ugly CLR namespaces for the types. How do I fix this? The mapping from an XML or WSDL namespace to a CLR namespace is a mechanical

Configuring Client Certificate Credentials

How do I configure a client to provide the certificate for certificate credentials? You need to use the client credentials behavior to provide the credentials that the client will use to authenticate to the service. Here’s the basic template that you

Missing Binding Extensions

Why do I get an error “configuration evaluation context not found” when I try to create a custom binding using bindings or binding elements from a library? The evaluation context not found error (or in traces with the identifier System.ServiceModel.EvaluationContextNotFound)

Stumbling on Extended Protection Policy

When generating a proxy I’m getting an error about the extendedProtectionPolicy element not being supported. Why didn’t I see this error before? Extended protection policy is a change to how integrated Windows authentication works that is intended to

Top Down Binding Element Order

Why does a message encoder have to be specified before the transport when constructing a binding? A message encoder doesn’t directly fit into a channel stack because the message encoder type doesn’t implement any of the channel shapes. Instead, a message

Reading Configuration from a Repository

Can I use a centralized configuration repository in a distributed WCF application? Yes, configuration is something that’s abstracted from the service or client logic in WCF although replacing the implementation behind that abstraction can be quite a bit

Load Balanced Web Service Bindings

What options can I use with WSHttpBinding to make it friendlier to load balancing? The primary difficulty encountered when using WSHttp with a load balancer is that WSHttp is easy to configure to produce application-level sessions between the client and

Testing Services with HTTPS

How do I setup a test environment for a service that is using HTTPS? Certificate validation fails because the test machine doesn’t have the right machine name. Included in the definition of a certificate is the fully qualified domain name that you gave
More Posts Next page »
 
Page view tracker