CSLA and the new Azure Mobile Services

CSLA and the new Azure Mobile Services

Old forum URL: forums.lhotka.net/forums/t/11588.aspx


TSF posted on Wednesday, September 19, 2012

Does anyone know if you can use the new Azure Mobile Services to host a CSLA remote data portal?  I am currently testing a WinRT app with the CSLA data portal hosted in an Azure Cloud Service (which works fine), but I'm not quite sure from my reading whether the new Mobile Service offering would allow me to do the same thing.

RockfordLhotka replied on Wednesday, September 19, 2012

I haven't look at that yet, so I don't know.

CSLA has fairly straightfoward requirements. If the server allows you to run ASP.NET code and to expose a WCF endpoint, then the data portal should work just fine.

TSF replied on Thursday, September 20, 2012

Thanks.  FWIW - I received a reply in the Azure dev forum this morning that running a WCF service in one of the free Azure web sites (I didn't ask about mobile sites) may not be possible.  The poster wasn't sure, but he mentioned the following: 

"One workaround for this may be to look at [using] the Web API functionality to implement REST based services."

Also, this person stated that you could not run in full trust mode (again, in the web site...not sure about mobile site).  Not sure if that is a problem for WCF services in general.

RockfordLhotka replied on Thursday, September 20, 2012

A couple ideas then.

First, I _think_ that CSLA 4.5 can now run in partial trust as long as you switch the serializer to MobileFormatter. The primary issue with full trust is due to WCF and serialization.

Second, I do plan (at some point) to create a Web API data portal channel. You can do that now if you'd like - adding a data portal channel doesn't require changes to CSLA at all, because the whole proxy/host model uses a provider pattern (see the 'Using CSLA 4: Data Portal Configuration' book).

Copyright (c) Marimer LLC