views:

27

answers:

1

(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?

A: 

Hi again,

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

alexander.biskop
Thank you for answering, but I've already tried that example, downloaded the project and tried it again - won't work for me. (The "Silverlight-enabled WCF service" template also seems to bring on cross-domain posting errors for me.) I will try installing VS 2010 and then see if it works better.
Torbjörn Josefsson
HA! It works fine with VS 2010.. it seems so far.. :)Now I just have to figure out how to give you credit for it, since your answer worked :)
Torbjörn Josefsson