Welcome to MSDN Blogs Sign in | Join | Help

Eric Johnson (MCS)

My ramblings on .NET, related technologies, community, events, gaming, & life in general
WCF Typed Service Moinker Contract

When using a typed service moniker, the contract specifies the UUID of the interface for the contact (IInteropTest) defined in the web.config of the WCF service.  The UUID can be located by viewing the type library for the registered assembly (i.e. InteropTestProxy.tlb) using Oleview.exe.


Strong Named Proxy Assembly

Register with COM - “regasm InteropTestProxy.dll /tlb:InteropTestProxy.tlb”

Install into GAC – “gacutil /i InteropTestProxy.dll”


Type Library – Interface for IInteropTest

[

    odl,

    uuid(604B94B4-915D-3EC7-94B9-060F0B1337AD),

    version(1.0),

    dual,

    oleautomation,

    custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, InteropTestProxy.InteropTest.IInteropTest)   

]
interface IInteropTest : IDispatch


WCF Service - Web.config

<system.serviceModel>

    <services>

      <service behaviorConfiguration="returnFaults" name="InteropTest">

        <endpoint binding="wsHttpBinding" name="InteropTest" contract="IInteropTest" />

      </service>

    </services>

    <behaviors>

      <serviceBehaviors>

        <behavior name="returnFaults" >

          <serviceDebug includeExceptionDetailInFaults="true" />

          <serviceMetadata httpGetEnabled="true"/>

        </behavior>

      </serviceBehaviors>

    </behaviors>

</system.serviceModel>


Client Typed Moniker Code

Set proxy = GetObject("service:address=http://localhost/InteropTest/service.svc, binding=wsHttpBinding, contract={604B94B4-915D-3EC7-94B9-060F0B1337AD}")

 

Posted: Monday, October 23, 2006 8:29 AM by ericjo
Filed under:

Comments

No Comments

Anonymous comments are disabled
Page view tracker