2016-02-25 41 views
2

我有一個EncryptedClient爲我服務像這樣ServiceStack EnryptedClient使用IReturnVoid DTO錯誤

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

和DTO

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

服務的處理方法其實並不重要,當我打電話

_encryptedCient.Send(new AlarmNotification { }); 

它到達服務器,請求處理正確,但服務完成後處理我得到ArgumentNullException,指出名爲「s」的某個字符串引用了null。如果我使用除IReturnVoid以外的任何其他返回類型,則一切正常。任何想法爲什麼發生這種情況都是受歡迎

回答

2

這是一個現在應該是resolved from this commit的錯誤。

此更改從v4.0.53開始,現在是available on MyGet

+0

很奇怪,但即使在更新到4.0.53之後,問題仍然存在,但我從我的解決方案中刪除了包緩存和包。 – HardLuck

+0

@HardLuck奇怪,你是否也刪除'%LOCALAPPDATA%\ NuGet \ Cache \'中的NuGet緩存? – mythz

+0

是的,並手動檢查,沒有什麼了,我甚至嘗試重新解決所有的軟件包。我也檢查了發送方法的參考 - ServiceStack.Interfaces.4.0.53 – HardLuck