To work with a WCF AMF service from a C# client, you will need to modify your configuration file to contain the following extensions, behaviors, and bindings:
<configuration>
  <system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="amfExtensions" type="WcfFlashRemoting.ServiceModel.Configuration.AmfEnablingElement, WcfFlashRemoting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      </behaviorExtensions>
      <bindingElementExtensions>
        <add name="amfMessageEncoding" type="WcfFlashRemoting.ServiceModel.Configuration.AmfBindingElementExtensionElement, WcfFlashRemoting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      </bindingElementExtensions>
    </extensions>
    <behaviors>
      <endpointBehaviors>
        <behavior name="amfBehave">
          <amfExtensions />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <customBinding>
        <binding name="amfBinding">
          <amfMessageEncoding />
          <httpTransport manualAddressing="false" />
        </binding>
      </customBinding>
    </bindings>    
  </system.serviceModel>
</configuration>


Once those configuration elements are added, create a new endpoint:
<configuration>
  <system.serviceModel>    
    <client>
      <endpoint address="http://localhost:3900/WebHost/Example6.svc/amf"
        behaviorConfiguration="amfBehave" binding="customBinding" bindingConfiguration="amfBinding"
        contract="Example6Service.ICalculatorContract" name="AmfBinding_ICalculatorContract" />
    </client>
  </system.serviceModel>
</configuration>

Be sure to modify the endpoint address and contract to correspond to your service and make the name unique.

There is currently no supported way to access a non-WCF AMF endpoint using WCF Flash Remoting.

Last edited Oct 20, 2009 at 9:52 PM by mdekrey, version 2

Comments

rogeriomc Apr 11, 2010 at 5:34 PM 
Hi Matthew!

According to the 7 examples and the last paragraph in this section, is not possible to use the WCF Flash Remoting component to expose an AMF endpoint and consume using a Flex/Flash client. Is it correct?

Thanks,

Rogério Moraes de Carvalho