Sajay

Life, The Universe and Everything Distributed.

April, 2006

Posts
  • Sajay

    WCF Configuration Schema for Feb CTP

    • 1 Comments

    If you want to correct the attributes/elements that show up in the visual studio intellisense for indigo with the Feb CTP, you should copy the schema files for dotNetConfig to
    C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas 

    This was uploaded version by Juval Lowy from IDesign Inc
    http://www.idesign.net/idesign/temp/dotNetConfig.zip

    ref: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=284646&SiteID=1

  • Sajay

    metadataPublishing required on Service Behavior

    • 0 Comments

    If you tried generating the proxy against the STS sample this is what you end up with.

    Microsoft (R) Service Model Metadata Tool
    [Microsoftr .NET Framework, Version 3.0.50727.357]
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Error: Unable to obtain Metadata from http://localhost/FederationSample/BookstoreService/store.svc

    WS-MetadataExchange Error
        Uri:
    http://localhost/FederationSample/BookstoreService/store.svc
        Metadata contains a reference that cannot be resolved: 'http://localhost/FederationSample/Bookst
    oreService/store.svc'.
        There was no endpoint listening at
    http://localhost/FederationSample/BookstoreService/store.svc
    that could accept the message.  This could be caused by an incorrect address or SOAP action, among o
    ther things. See InnerException, if present, for more details.
        The remote server returned an error: (404) Not Found.

    HTTP GET Error
        Uri:
    http://localhost/FederationSample/BookstoreService/store.svc
        The document at the url http://localhost/FederationSample/BookstoreService/store.svc was not rec
    ognized as a known document type.
    The error message from each known type may help you fix the problem:
    - Report from 'DISCO Document' is 'Root element is missing.'.
    - Report from 'WSDL Document' is 'There is an error in XML document (0, 0).'.
      - Root element is missing.
    - Report from 'XML Schema' is 'Root element is missing.'.

    If you would like more help, please type "svcutil /?"

    Basically the point is the metadataPublishing configuration has to be set explicitly on the service behavior since the Feb CTP bits and this should get you through.

    <metadataPublishing enableMetadataExchange='true'
                     enableGetWsdl='true
    '
                     enableHelpPage='true'></metadataPublishing>

  • Sajay

    Message Inspector with Custom Behavior and IClientMessageInspector

    • 0 Comments

    My goal was to to make a simple MessageInspector so that I can see what message is going out at some point and probably add some info into the headers at the client side. Now the SDK had quite a good sample of the message inspector implementation but I was looking for something like a hello world.


    The point is how you tie up following.

    1. Add a custom behavior to the proxy endpoint.
                          proxy.Endpoint.Behaviors.Add(new CustomBehavior());

    2. Add the IClientMessageInspector to the behavior in the ApplyClientBehavior of the custom behavior
                          behavior.MessageInspectors.Add(new CustomMessageInspector());

    3. Implement the BeforeSendRequest or AfterRecieveReply to get the message

    Do provide your inputs on how this can be better used.

Page 1 of 1 (3 items)