Last post Apr 25, 2019 09:40 AM by Ackerly Xu
Apr 23, 2019 01:15 AM|oned_gk|LINK
I'm new consuming web services.
I'm using Simple FormsAuthentication and web service, by providing user and password to login, i get profile and roles data from the web service.
But, i want to consume profile and roles in other pages. I don't know how to get it without providing password. I don't want to use session variable.
Please help me.
Apr 23, 2019 05:57 AM|Ackerly Xu|LINK
Not sure why you don't want to use session variable , if you use session here , you could meet your requirement.
If you don't want to use session, you also need a way to keep the use's state.
For example, use a distributed cache server to store the use data.
Could you tell use why you don't want to use session variable?
Apr 24, 2019 02:43 AM|oned_gk|LINK
When session timeout and user identity still autenticated, sometime i'm loosing session variables related to the user.
Apr 24, 2019 08:27 AM|Ackerly Xu|LINK
Hi oned_gk ,
You should set formauthentication cookie timeout and session timeout , or logout the user in session start like the link below suggests.
Apr 25, 2019 03:50 AM|oned_gk|LINK
I've done that before. User will be redirected to login page when session timeout, but user will loose their form data.
Apr 25, 2019 09:40 AM|Ackerly Xu|LINK
Then you could require the user to enter their username and password and send a request to webservice with username and passwork to get back user data and restore them in session.
When session timeout , the user should be redirected to login page and login again.
If you don't want this to occur frequently, you could extended expiration time.