Welcome to Windows Communication Foundation (WCF)
Top Tasks :

Browse by Tags

All Tags » Proxies   (RSS)
Showing page 1 of 3 (22 total posts)
  • 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:tns ="http://test" targetNamespace ="http://test" xmlns:xs ="http://www.w3.org/2001/XMLSchema" > < xs:complexType name ="CircularList" > < xs:sequence > < xs:element minOccurs ="0"
    Posted to WCF Team Bloggers (Weblog) by Anonymous on August 27, 2008
    Filed under: Indigo, Service Model, Proxies, Serialization
  • 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 ends any chance of having an easily interoperable service. For example, a contract containing an IPAddress seems innocuous. [OperationContract] string LookupHostName(IPAddress address); However,
    Posted to WCF Team Bloggers (Weblog) by Anonymous on August 5, 2008
    Filed under: Indigo, Service Model, Contracts, Proxies
  • 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 of IContextChannel, which is a type that you've probably never seen before. Why are you expected to have this unknown type? It's because you have instances of it floating around all the time even though
    Posted to WCF Team Bloggers (Weblog) by Anonymous on July 18, 2008
    Filed under: Service Model, Indigo, Proxies, Answers
  • 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 to SOAP headers, manipulating an HTTP header through code looks a bit different. SOAP headers are elevated to a special significance in the programming model. Everything else, including HTTP headers, is relegated
    Posted to WCF Team Bloggers (Weblog) by Anonymous on July 8, 2008
    Filed under: Indigo, HTTP, Service Model, Proxies, Orcas
  • 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 protocol. In your application code you can create an OperationContextScope around the request in order to change some of the request properties. Inside an OperationContextScope, you have a valid instance of
    Posted to WCF Team Bloggers (Weblog) by Anonymous on July 7, 2008
    Filed under: Indigo, Channels, Answers, Service Model, Proxies
  • 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 time that an unknown type needs to become a known type. The performance of that first call grew increasingly worse rather quickly as the number of known types increased, although the performance of successive
    Posted to WCF Team Bloggers (Weblog) by Anonymous on May 21, 2008
    Filed under: Indigo, Service Model, Proxies, Orcas
  • 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 a ChannelFactory<T>. When you're using ChannelFactory<T>, you are midway between the tool-based automatic proxy generation and the channel-based manual proxy construction. Everything here
    Posted to WCF Team Bloggers (Weblog) by Anonymous on May 15, 2008
    Filed under: Service Model, Indigo, Proxies
  • 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. For example, if I have a data contract that uses a List: [DataContract] class Data { [DataMember] public List< string > data; } Then, the metadata representation of this data contract is actually described
    Posted to WCF Team Bloggers (Weblog) by Anonymous on May 7, 2008
    Filed under: Indigo, Answers, Service Model, Proxies, Serialization
  • 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. If we take a data contract that contains both public and private members, [DataContract] class Data { [DataMember] public int i; [DataMember] private string s; } Then, the type representation
    Posted to WCF Team Bloggers (Weblog) by Anonymous on May 5, 2008
    Filed under: Indigo, Answers, Service Model, Contracts, Proxies
  • Manual Context Management

    How do I manually manage the context when sharing a client object? The default mode when using a context binding is for the context to be managed internally by the context channel underneath the client proxy. This is similar to how by default cookies are managed by an HTTP channel to send and receive cookie context. With an HTTP channel you can disable automatic cookie management and control the context yourself. There is a similar process that you can use to take control for a context binding. Here's
    Posted to WCF Team Bloggers (Weblog) by Anonymous on April 23, 2008
    Filed under: Indigo, HTTP, Answers, Service Model, Proxies, Orcas
1 2 3 Next >

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us