Search code examples
c#.netservicestackhttpserver

ServiceStack EnryptedClient use IReturnVoid DTO error


I have an EncryptedClient for my Service like this

_jsonClient = new JsonServiceClient(baseUrl);
string publicKeyXml = _jsonClient.Get(new GetPublicKey());
_encryptedCient = _jsonClient.GetEncryptedClient(publicKeyXml);
_encryptedCient.SessionId = authResponse.SessionId;

and a DTO

public class AlarmNotification : IReturnVoid, IHasSessionId
{
    public string SessionId { get; set; }
}

the handler method in service does not really matter, when i call

_encryptedCient.Send(new AlarmNotification { });

It hits the server, request is processed correctly but after Service finished the processing I get ArgumentNullException, stating that some string named "s" is referencing a null. If I use any other return type except IReturnVoid, everything works fine. Any ideas why this happens are welcome.


Solution

  • This was a bug that should now be resolved from this commit.

    This change is available from v4.0.53 that's now available on MyGet.