ASP Session Context State missing in WCF call from Silverlight

I added a new Silverlight app and corresponding WCF service to my site yesterday and I couldn’t understand why the WCF service could not see any of the details in the ASP Session Context property bag. After a bit of poking around I realised it was very simple;
The web site was using IIS at localhost/mysite but the add service reference in my Silverlight app had created a ServiceReferences.ClientConfig using an endpoint with my full machine name; machine.domain.com/mysite. The net effect is that these are treated as different web sites and therefore there is no shared cookie and thus session context. Changing the ClientConfig to localhost solved it.
Advertisements
This entry was posted in Silverlight. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s