Problems with a custom login method w/.NET Core 2.1

net
visual-studio

(Todd Manchester) #1

I am working on a .NET Core 2.1 client when I execute this code:

Using libraries from:

C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin.NETStandard
version: 9.4.109.1377

        var ls = CoLoginService.Create(lMessage, lChannel);
        var result = ls.LoginChronicle2(userId, password, UserTypeEnum.ChronicleMobileAndroid, out loggedInUserInfo, cvsl.ToArray());

I get this exception:

Unknown class found in stream: UserInfo. Either the corresponding .NET type is not defined or the TypeManager.TypeAssemblies collection has not been initialized properly.

Stack Trace:
   at RemObjects.SDK.TypeManager.CreateInstanceOfType(String typeName) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\TypeManager.cs:line 90
   at RemObjects.SDK.Serializer.CreateComplexTypeInstance(String className) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Serializers\Serializer.cs:line 400
   at RemObjects.SDK.BinSerializer.BeginReadComplex(String name, Type type, ComplexType& value) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Serializers\BinSerializer.cs:line 520
   at RemObjects.SDK.Serializer.ReadComplex(String name, Type type) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Serializers\Serializer.cs:line 587
   at RemObjects.SDK.Message.Read(String name, Type type, StreamingFormat format) in c:\CI\b\rofx\932\RemObjects SDK for .NET\Source\RemObjects.SDK\Messages\Message.cs:line 355
   at Chronicle.DataAccess.Remote2.LoginService_Proxy.LoginChronicle2(String userId, String password, UserTypeEnum LoginType, UserInfo& userInfo2, ChronicleKeyValueStrings[] ClientData) in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\Chronicle_DataAccess_Remote2_Intf.cs:line 11078
   at LatestLambdaClientTest.RO_Connections.ChronicleLogOn(String userId, String password) in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\RO_Connections.cs:line 60
   at LatestLambdaClientTest.RO_Connections..ctor(String urlTarget, String userName, String password) in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\RO_Connections.cs:line 28
   at LatestLambdaClientTest.ChronicleJob.CreateJob() in C:\Users\........\source\repos\LatestLambdaClientTest\LatestLambdaClientTest\ChronicleJob.cs:line 121

Any idea whats going on?

Thanks,
Todd


(Ryan Jantz) #2

Just out of curiosity have you tried to put RemObjects.SDK.TypeManager.TypeAssemblies.Add(typeof(UserTypeEnum).Assembly); anywhere before the code you posted?


(antonk) #3

Hello

As Ryan says


(Todd Manchester) #4

Thank you gentlemen that is what i was missing!