MobileProxy on NET 4.0 - Could not load type 'Csla.DataPortalClient.MobileProxy' from assembly 'Csla'.

MobileProxy on NET 4.0 - Could not load type 'Csla.DataPortalClient.MobileProxy' from assembly 'Csla'.

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


tiago posted on Sunday, April 21, 2013

Hi Rocky,

I have this test project I mentioned in another thread . Using mobile proxy/serializer It runs on CSLA .NET 4.5.23-Beta under NET 4.5. There is this ExecutionLocation issue that you are aware.

The same project reports an error on CSLA .NET 4.5.23-Beta under NET 4.0. I tested it on VS2010 and VS 2012 and got the same error. Using the old WcfProxy there is no problem.

The error is the following

System.TypeLoadException was unhandled
  HResult=-2146233054
  Message=Could not load type 'Csla.DataPortalClient.MobileProxy' from assembly 'Csla'.
  Source=Csla
  TypeName=Csla.DataPortalClient.MobileProxy
  StackTrace:
       at Csla.DataPortal`1.Fetch(Type objectType, Object criteria)
       at Csla.DataPortal`1.Fetch(Object criteria)
       at Csla.DataPortal.Fetch[T](Object criteria)
       at DocStore.Business.Security.CustomIdentity.GetIdentity(String username, String password) in D:\VS Projects\DocStore\DocStore-4.5\DAL-DR\DocStore.Business\Security\CustomIdentity.cs:line 110
       at DocStore.Business.Security.CustomPrincipal.Login(String username, String password) in D:\VS Projects\DocStore\DocStore-4.5\DAL-DR\DocStore.Business\Security\CustomPrincipal.cs:line 92

(...)

RockfordLhotka replied on Sunday, April 21, 2013

MobileProxy is not available to .NET 4 clients. It uses async features not available to .NET 4 clients.

tiago replied on Monday, April 22, 2013

RockfordLhotka

MobileProxy is not available to .NET 4 clients. It uses async features not available to .NET 4 clients.

Correct. Updating BCL packages to the now stable release solves the issue. I also had to replicate Service References content to Csla.Net4 project. BTW the test project is running on VS2010.

Copyright (c) Marimer LLC