What's the best way to detect the start of a session (similar to Global.ashx's Session_Start) when using ServiceStack SessionFeature? -
i've enabled sessions support in service stack like:
container.register<iredisclientsmanager>(c => container.resolve<pooledredisclientmanager>()); container.register<icacheclient>(c => c.resolve<iredisclientsmanager>().getcacheclient()); container.register<isessionfactory>(c => new sessionfactory(c.resolve<icacheclient>())); //re: https://github.com/servicestack/servicestack/wiki/sessions plugins.add(new sessionfeature());
i see ss-id , ss-pidd cookies set upon visiting site, know when session started (i.e., first request user) can capture incoming referrer url.
using traditional asp.net sessions, i'd use session_start in global, doesn't fire me while using ss sessions.
is there way detect session start event when using servicestack? didn't find reference in queries online, or on servicestack sessions wiki.
there no "session started" event in servicestack's sessions feature, there events on iauthsession might useful use instead, e.g:
public interface iauthsession { ... void onregistered(iservicebase registrationservice); void onlogout(iservicebase authservice); void onauthenticated(iservicebase authservice, iauthsession session, ioauthtokens tokens, dictionary<string, string> authinfo); }
if still see onsessionstarted event request feature in servicestack's github issues (and include use-case), can keep track of it.
Comments
Post a Comment