Nicholas Allen's Indigo Blog

Windows Communication Foundation From the Inside

Browse by Tags

Tagged Content List
  • Blog Post: 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,...
  • Blog Post: 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...
  • Blog Post: Fix for Partially Trusted Clients using Windows Authentication

    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. Connection sharing is a performance optimization to pool HTTP connections between multiple calls. Ordinarily, connections are not allowed to be shared if they use Windows...
  • Blog Post: 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 transformation of breaking apart the authority...
  • Blog Post: 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 can fill out and stick in the behaviors section...
  • Blog Post: 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 enhance security. The use of extended protection...
  • Blog Post: Exception Handling Proxy Generator

    The WCFProxyGenerator tool on CodePlex has been updated, which is a community contributed tool that generates proxy classes that help manage the lifetimes of the proxy objects. As you might guess from the name the primary way that the proxy class helps manage object lifetimes is to deal with factories...
  • Blog Post: Contract First Development Tool

    A beta release of the Web Services Contract First tool is available on CodePlex. This is a Visual Studio 2008 add-in targetting WCF made by the same group in the web services community that did a tool of the same name for ASMX (to tell the two apart, the WCF version is called WSCF Blue while the ASMX...
  • Blog Post: Tripping over Missing Servers

    A common complaint is that the first call on a client object takes some disproportionately large amount of time, usually ten seconds or more, while successive calls are instantaneous. There are many reasons why this might happen so there's no generic resolution for this problem. Sometimes it is caused...
  • Blog Post: Introduction to Ad Hoc Discovery

    Jesus Rodriguez has a description of WS-Discovery that covers examples in WCF 4.0 for ad hoc discovery networks. Ad hoc discovery is the approach that uses broadcast messages to publish and discover resources on the network. The other approach, managed discovery, uses a centralized service to coordinate...
  • Blog Post: Debugging a Most Common Problem

    Tess Ferrandez takes a debugging look at what happens when you fail to close client proxies in a timely manner. Given the relatively long default time before the server idles out a client (10 minutes) and given the relatively small default number of connected clients (10), this is probably one of the...
  • Blog Post: Proxy Caching Changes

    I don't think I ever wrote about the changes made to WCF generated typed proxies in Orcas, although Wenlong had an article about the changes to proxy behavior back when they were made. Generated proxies are the ones produced from the standalone client classes that are generated by tools such as svcutil...
  • Blog Post: No Choice for Data Contracts

    I have a schema file that describes a choice between multiple layout formats for a type. How do I build a proxy that matches this schema? The reason that this is probably not working is because DataContractSerializer for the most part does not support ambiguous, optional, or multiply-described sections...
  • Blog Post: Read Only Data Members

    How do I specify that the client proxy should not have a setter for a particular data member? It doesn't make sense for the service to be able to dictate what the client can do with a piece of data. Once data has been put on the wire, you can't stop the other side that is receiving the message from...
  • Blog Post: Getting Better Time Formats

    Orcas introduced a new DateTimeOffset class that is easier to use for representing absolute times than the original DateTime class. However, if you run svcutil on a contract that contains a DateTimeOffset, you'll get an ugly generated structure because DateTimeOffset isn’t recognized as a natively supported...
  • Blog Post: Avoiding Infinite Schema Chains

    I was working on some services with recursive data structures when I noticed that there were a few cases where I would get crashes while trying to generate proxy classes. The problems seemed to be around types that were a sequence of instances of themselves. That looks like this: < xs:schema xmlns...
  • Blog Post: System Types in Metadata

    It's bad practice to use system types when defining an operation contract. A system type is often a complex composition of primitive types that has no direct analog in other implementations. By using a system type, you bind your service to the particular implementation used by that type, which effectively...
  • Blog Post: Finding a Client Channel

    Where can I get the IContextChannel that OperationContextScope requires? OperationContextScope allows you to create a temporary scope in which context for a service operation can build up before and after the operation is actually called. The constructor for OperationContextScope takes an instance...
  • Blog Post: Adding Headers to a Call (HTTP Version)

    Yesterday I talked about adding SOAP headers to an outgoing request using a variety of different methods. The most straightforward method was to create an OperationContextScope in your application code to establish an OutgoingMessageHeaders collection. Although HTTP headers are similar in spirit...
  • Blog Post: Adding Headers to a Call

    How do I add SOAP headers to an outgoing request? There are a few different ways to add headers to a message depending on how you need to control the header content and where you need to insert the header. I like to think of these methods as being split among the application, the proxy, and the...
  • Blog Post: Faster Known Types in Orcas

    When I talked about some of the enhancements in Orcas, I left out a performance improvement for services that use a large number of known types. There are various ways of defining the known types for a service operation, and all of the known type collections are aggregated together for use the first...
  • Blog Post: Customizing Proxy Configuration

    In the past I've written about overriding ApplyConfiguration on a service to take control of the configuration process. There is a similar technique that you can use for client proxies although getting started is not quite as obvious. I'll talk today about the typed proxies generated by constructing...
  • Blog Post: Generating Types with Lists

    I have a data contract that contains a collection type but the generated proxy appears as an array. How can I make the proxy use a collection type as well? I've talked in the past about how the representation of a type in metadata is decoupled from the CLR representation of a type in the service...
  • Blog Post: 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 why the information isn't preserved by the representation...
  • Blog Post: Messaging Additions in Orcas

    I've had scattered posts in the past talking about the messaging features and enhancements in Orcas. Over the next few days I'm going to be doing a bit of consolidating to organize that information into a few listings of the top changes using reasonably sized chunks. Today I'll look at some of the...
Page 1 of 2 (41 items) 12