Running fresh clone of the HelloCart sample fails for options 4 & 5..
I kept changing the port to try fix 5 but it fails with the new port number.. Was running in VS2022 on Windows.
dotnet run --project src/HelloCart/HelloCart.csproj
Select the implementation to use:
1: ConcurrentDictionary-based
2: EF Core + Operations Framework (OF)
3: EF Core + OF + DbEntityResolvers (pipelined fetches)
4: EF Core + OF + DbEntityResolvers + Client-Server
5: EF Core + OF + DbEntityResolvers + Client-Server + Multi-Host
Type 1..5: 4
Initial state:
Change product price by typing [productId]=[price], e.g. "apple=0".
See the total of every affected cart changes.
[productId]=[price]: apple=20
Error: No publication state info was found. Typically this indicates you're hitting a wrong endpoint (check your client definition interface) or forgot to add [Publish] attribute to the controller's method.
dotnet run --project src/HelloCart/HelloCart.csproj
Select the implementation to use:
1: ConcurrentDictionary-based
2: EF Core + Operations Framework (OF)
3: EF Core + OF + DbEntityResolvers (pipelined fetches)
4: EF Core + OF + DbEntityResolvers + Client-Server
5: EF Core + OF + DbEntityResolvers + Client-Server + Multi-Host
Type 1..5: 5
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in operation completion handler of type 'Stl.Fusion.Operations.Internal.CompletionProducer'
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Samples.HelloCart.EditCommand`1[Samples.HelloCart.Cart]. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Id', line 1, position 112.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType)
at Stl.Serialization.NewtonsoftJsonSerializer.Read(String data, Type type)
at Stl.Serialization.Internal.CastingTextSerializer`1.Read(String data)
at Stl.Serialization.TextSerialized`1.Deserialize()
at Stl.Serialization.TextSerialized`1.get_Value()
at Stl.Fusion.EntityFramework.Operations.DbOperation.get_Command()
at Stl.Fusion.Operations.Internal.CompletionProducer.OnOperationCompleted(IOperation operation)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in operation completion handler of type 'Stl.Fusion.Operations.Internal.CompletionProducer'
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Samples.HelloCart.EditCommand`1[Samples.HelloCart.Product]. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Id', line 1, position 115.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType)
at Stl.Serialization.NewtonsoftJsonSerializer.Read(String data, Type type)
at Stl.Serialization.Internal.CastingTextSerializer`1.Read(String data)
at Stl.Serialization.TextSerialized`1.Deserialize()
at Stl.Serialization.TextSerialized`1.get_Value()
at Stl.Fusion.EntityFramework.Operations.DbOperation.get_Command()
at Stl.Fusion.Operations.Internal.CompletionProducer.OnOperationCompleted(IOperation operation)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in operation completion handler of type 'Stl.Fusion.Operations.Internal.CompletionProducer'
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Samples.HelloCart.EditCommand`1[Samples.HelloCart.Product]. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Id', line 1, position 115.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType)
at Stl.Serialization.NewtonsoftJsonSerializer.Read(String data, Type type)
at Stl.Serialization.Internal.CastingTextSerializer`1.Read(String data)
at Stl.Serialization.TextSerialized`1.Deserialize()
at Stl.Serialization.TextSerialized`1.get_Value()
at Stl.Fusion.EntityFramework.Operations.DbOperation.get_Command()
at Stl.Fusion.Operations.Internal.CompletionProducer.OnOperationCompleted(IOperation operation)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in operation completion handler of type 'Stl.Fusion.Operations.Internal.CompletionProducer'
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Samples.HelloCart.EditCommand`1[Samples.HelloCart.Cart]. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Id', line 1, position 112.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType)
at Stl.Serialization.NewtonsoftJsonSerializer.Read(String data, Type type)
at Stl.Serialization.Internal.CastingTextSerializer`1.Read(String data)
at Stl.Serialization.TextSerialized`1.Deserialize()
at Stl.Serialization.TextSerialized`1.get_Value()
at Stl.Fusion.EntityFramework.Operations.DbOperation.get_Command()
at Stl.Fusion.Operations.Internal.CompletionProducer.OnOperationCompleted(IOperation operation)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in operation completion handler of type 'Stl.Fusion.Operations.Internal.CompletionProducer'
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Samples.HelloCart.EditCommand`1[Samples.HelloCart.Product]. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Id', line 1, position 115.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType)
at Stl.Serialization.NewtonsoftJsonSerializer.Read(String data, Type type)
at Stl.Serialization.Internal.CastingTextSerializer`1.Read(String data)
at Stl.Serialization.TextSerialized`1.Deserialize()
at Stl.Serialization.TextSerialized`1.get_Value()
at Stl.Fusion.EntityFramework.Operations.DbOperation.get_Command()
at Stl.Fusion.Operations.Internal.CompletionProducer.OnOperationCompleted(IOperation operation)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in one of operation completion handlers
System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks')
at System.Threading.Tasks.Task.WhenAll(Task[] tasks)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in one of operation completion handlers
System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks')
at System.Threading.Tasks.Task.WhenAll(Task[] tasks)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in one of operation completion handlers
System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks')
at System.Threading.Tasks.Task.WhenAll(Task[] tasks)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in one of operation completion handlers
System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks')
at System.Threading.Tasks.Task.WhenAll(Task[] tasks)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
fail: Stl.Fusion.Operations.OperationCompletionNotifier[0]
Error in one of operation completion handlers
System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks')
at System.Threading.Tasks.Task.WhenAll(Task[] tasks)
at Stl.Fusion.Operations.OperationCompletionNotifier.<>c__DisplayClass29_0.<<NotifyCompleted>b__0>d.MoveNext()
Unhandled exception. System.IO.IOException: Failed to bind to address https://127.0.0.1:58221: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted.
---> System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted.
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Samples.HelloCart.V5.AppV5.InitializeAsync() in C:\Data\git\Stl.Fusion.Samples-master\Stl.Fusion.Samples-master\src\HelloCart\v5\AppV5.cs:line 26
at Program.<Main>$(String[] args) in C:\Data\git\Stl.Fusion.Samples-master\Stl.Fusion.Samples-master\src\HelloCart\Program.cs:line 40
at Program.<Main>$(String[] args) in C:\Data\git\Stl.Fusion.Samples-master\Stl.Fusion.Samples-master\src\HelloCart\Program.cs:line 78
at Program.<Main>(String[] args)