asp.net mvc 4 - ServiceStack AuthSession null after modifying a js file in an MVC project -
i have project uses mvc 4 , servicestack, in web role in azure service, hosted development in iis express. i'm using custom auth provider 1 in customauthenticationmvc example project; authenticates using membership class , fills roles using roles class. started off developing page straight html/css/js page making api calls servicestack , authenticating pop-up when returned 401, used when stopped , restarted project rebuild service. while developing in form, modify static files , reload page , see changes without disruption auth session, evidenced fact authenticated api calls continue succeed after reloading page.
later, once development complete, moved html cshtml controller serves up, added forms authentication, added [authorize] controller, , added code account controller when user logs in, authenticates servicestack, again using code in customauthenticationmvc guide. added forms redirection hijacking prevention continue detect unauthenticated api calls. works fine, except this: if modify static file such js file , reload route controller returns cshtml, reloads fine, cshtml load api calls result in 401s. tells me forms authentication ticket still valid, somehow api calls no longer being authenticated. since i'm doing refreshing browser, ss cookies should still there, if set breakpoint on 1 line in controller , check servicestack authsession, null.
so bottom line, why changing js file in mvc project cause servicestack authsession disappear, , can fix?
Comments
Post a Comment