Not sure how much this is a problem with JsonServiceStackClient or iisexpress-proxy but its driving me mad!
In my local environment I’m using iisexpress-proxy to route into my instance of servicestack running on iisexpress, Using my mobile application I can log in fine and then issue a request which gets executed correctly. However issue a third request it returns a 401.
#Authorised First Request : 200
##sessionid
SZMMJ8QLxsOPAccsfDta
##header
{Connection:close,Content-Type:application/json,Accept:*/*,Accept-Encoding:"gzip, deflate",Accept-Language:en-gb,Cookie:X-UAId=; ss-opt=perm; ss-pid=SZMMJ8QLxsOPAccsfDta,Host:"localhost:2117",User-Agent:Expo/1.20.2.109829 CFNetwork/887 Darwin/17.0.0,x-forwarded-host:"192.168.1.158:3000",x-forwarded-proto:http,x-forwarded-port:3000,x-forwarded-for:"::ffff:192.168.1.222"}
##items
{AspSessionIDManagerInitializeRequestCalled:True,__haspreauth:True,__session:PhoenixFleet.ServiceInterface.CustomUserSession,ss-id:eCDV9Mhp2Gv7WMny1Ck4,_requestDurationStopwatch:System.Diagnostics.Stopwatch,_logged:True}
#2nd Request : 401
##sessionid
SZMMJ8QLxsOPAccsfDta,ss-id=eCDV9Mhp2Gv7WMny1Ck4
##header
{Connection:close,Content-Type:application/json,Accept:/,Accept-Encoding:“gzip, deflate”,Accept-Language:en-gb,Cookie:“ss-id=eCDV9Mhp2Gv7WMny1Ck4; X-UAId=; ss-opt=perm; ss-pid=SZMMJ8QLxsOPAccsfDta,ss-id=eCDV9Mhp2Gv7WMny1Ck4”,Host:“localhost:2117”,User-Agent:Expo/1.20.2.109829 CFNetwork/887 Darwin/17.0.0,x-forwarded-host:“192.168.1.158:3000”,x-forwarded-proto:http,x-forwarded-port:3000,x-forwarded-for:"::ffff:192.168.1.222"}
##items
{AspSessionIDManagerInitializeRequestCalled:True,__haspreauth:True,__session:PhoenixFleet.ServiceInterface.CustomUserSession}
My question is why would SS think that my request is Unauthorized when I have logged in?