Sending an object with an enum as property results in Error: BinMessage.write: Unknown type of - undefined

For some reason I am unable to send an object with JavaScript from the client to the server with an enum as property of the object.

The enum and object:

<Struct Name="ObjectWithEnum" UID="{9718B71E-E410-4B26-A1E6-426159BF519B}" AutoCreateParams="1">
<Element Name="UpdateState" DataType="UpdateState">
<Enum Name="UpdateState" UID="{5BAB5938-1925-417F-9FDF-D9290F3310CF}">
<EnumValue Name="None">
<EnumValue Name="Modified">
<EnumValue Name="Inserted">
<EnumValue Name="Deleted">

The method is defined as follows:

<Operation Name="GetObjectWithEnum" UID="{E4E0916F-3C80-4DC2-85C1-51F743741F67}">
<Parameter Name="ObjectWithEnum" DataType="ObjectWithEnum" Flag="In" >

Calling the GetObjectWithEnum function results in a Error: BinMessage.write: Unknown type of - undefined on the client.

Server (Remoting SDK Server, RODL-based(.NET Core): (638.6 KB)

Client (ASP.NET Core Web App): (1.2 MB)


You need to use syntax like

var objectWithEnum = new Server.ObjectWithEnum();
objectWithEnum.fromObject({ UpdateState: new Server.UpdateState()});
objectWithEnum.UpdateState.value.value = "Modified";