My eventual goal is to persist a session across executions of a Winforms app by saving the session Ids from the JsonServiceClient, but it is not working. The code below is an attempt to duplicate what you do in some of your Auth tests, but the second call to my service AppConstants is returning a 401: Unauthorized. (the first call against oldClient works)
var uri = "http://localhost/dvsvc";
var oldClient = new ServiceStack.JsonServiceClient(uri);
var v = oldClient.Send<ServiceStack.AuthenticateResponse>(new ServiceStack.Authenticate()
{
UserName = "mtagliaf",
Password = "YourPasswordHere",
provider = "DV",
RememberMe = true
});
var aOld = oldClient.Get(new AppConstants());
Console.WriteLine(aOld.ScoutAbbr); //works
var newClient = new ServiceStack.JsonServiceClient(uri);
newClient.SetSessionId(oldClient.GetSessionId());
newClient.SetPermanentSessionId(oldClient.GetPermanentSessionId());
var aNew = newClient.Get(new AppConstants()); //401: unauthorized
Console.WriteLine(aNew.ScoutAbbr);