Search code examples
silverlightsessionwcfwcf-binding

Using Sessions in WCF Services called from Silverlight


(Using Visual Studio 2008, and Silverlight 3) -I've really looked around for this one, and now I'm just confused by all the solutions that simply won't work for me.

I'm trying to call a WCF service from a Silverlight client, which is no problem, but I can't get the service to handle sessions (I want to remember a few things about the callee between calls)

I've gathered that basicHttpBinding is no good for sessions, and I haven't managed to make wsHttpBinding work... what's the matter? I would have thought this was a pretty basic thing people would want in their WCF services, or am I just completely muddle-headed not to see how it can be done?


Solution

  • okay, seems like "Silverlight-enabled WCF Services" (WCF service with

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    

    and basicHttpBinding instead of wsHttpBinding) can do sessions with Silverlight: http://www.dotnetspider.com/Silverlight-Tutorial-317.aspx

    Cheers, Alex