Server Configuration

Add the WcfFlashRemoting.dll to your bin directory (or where your executable is).

Add the following to your configuration file to enable amf encoding:
<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="xmlBehave">
          <webHttp />
        </behavior>
        <behavior name="amfBehave">
          <amfExtensions />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <customBinding>
        <binding name="amfBinding">
          <amfMessageEncoding />
          <httpTransport manualAddressing="true" />
        </binding>
      </customBinding>
    </bindings>
  </system.serviceModel>
</configuration>


Then add a new endpoint to your service:
<endpoint address="amf"
  behaviorConfiguration="amfBehave"
  binding="customBinding"
  bindingConfiguration="amfBinding"
  contract="NS.TestService.IService1"
  />

Make sure you change the contract attribute to match your service.

You must add both the behavior configuration and the binding configuration for the AMF protocol to run properly.

Last edited Oct 21, 2009 at 9:38 PM by mdekrey, version 3

Comments

No comments yet.