IpcServiceFramework
IpcServiceFramework copied to clipboard
Interface with string parameters fail
Describe the bug
Functions like this fails:
bool Reload(string item);
Functions without string works as it should:
bool ReloadAll();
bool ReloadIteml(int num);
bool TryAll(bool areyousure);
It worked in earlier releases, but failing now.
Expected behavior Strings should work, the IpcServiceClient.InvokeAsync returns false always not triggering the function in the other side.
Hi @large ,
Is the bool Reload(string item) operation defined in a service contract currently shared between server and your client?
In the latest release (v2.3.1), both TCP and NamedPipe server types should be able to work with this kind of service contract signature.
@dmiu yes it is share between server and client. But I thinks the serialize process fails because the server is .net 472 and client is .core 3.1. Seems like .net process strings with mscorlib and .core are using System.Private.CoreLib
But it works on everything else than the strings.
@large Sorry but I'm not able to reproduce your issue and string should work for every existing version (covered by tests)
I'm facing the same issue. Communication between a .NET Core and .NET Framework process is throwing the following exception:
Newtonsoft.Json.JsonSerializationException: Error converting value "System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" to type 'System.Type'. Path 'ParameterTypes[0]'
This is happening on latest version 2.3.1 but doesn't seem to happen so far on version 2.2.2
I had to downgrade to get the software working again. Any ideas why the behaviour has changed between versions?
@mheskol I did not have any success on this, so I created my own IPC to handle it. Maybe this can be implemented into this?
https://github.com/large/SimpleCrossFrameworkIPC