views:

612

answers:

0

Could someone point me in right direction for where an example of setting up WCF on IIS using just HTTP and POST (so that Flash can call the service)

I was hoping this could be a solution: client calls my ASPX page which has MembershipProvider. Flash game is on the ASPX page and any calls to my WCF IIS service from the Flash game also pass in the ASP Session (Possible??). In my WCF I can do an IsAuthorized to make sure WCF is connecting with an authorized session. Problem is I don't know how to do any of this.

This is what I have so far in my web.config:

<membership defaultProvider="MemProvider">
    <providers>
    <add name="MemProvider" type="MemProvider"/>
    </providers>
</membership>

<system.serviceModel>
    <bindings>
        <webHttpBinding>
            <binding name="ServiceAspNetAjaxBinding">
                <security mode="TransportCredentialOnly"></security>
            </binding>
        </webHttpBinding>
    </bindings>
    <behaviors>
        <endpointBehaviors>
            <behavior name="ServiceAspNetAjaxBehavior">
                <enableWebScript/>
            </behavior>
        </endpointBehaviors>
        <serviceBehaviors>
            <behavior name="ServiceAspNetAjaxBehavior">
                <serviceMetadata httpGetEnabled="true"/>
                <serviceCredentials>
                    <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="MemProvider"/>
                </serviceCredentials>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    <services>
        <service name="Service" behaviorConfiguration="ServiceAspNetAjaxBehavior">
            <endpoint address="" behaviorConfiguration="ServiceAspNetAjaxBehavior" bindingConfiguration="ServiceAspNetAjaxBinding" binding="webHttpBinding" contract="Service"/>
        </service>
    </services>
</system.serviceModel>

..my WCF service is called via:

   [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Xml)]