Last post Apr 05, 2018 10:54 AM by Tushar Tale
Mar 28, 2018 08:03 AM|Tushar Tale|LINK
We have Asp.net application hosted on IIS7 with basic login functionality implemented with forms authentication.
We configured authentication time out(30 min) in forms authentication settings with sliding expiration enabled and session timeout also 30 mins
We have selenium automation scripts which test overall application .Sometimes, (Random) after entering valid credentials ,application force to login again with credentials. This hangs up the selenium script and in-turn fails test case.
This happens randomly; which makes it more difficult to analyze and reproduce.
We have tried following options
1: Analyzed selenium script for validating whether script is providing valid credentials or not . we checked ; it turned out no issues in script.
2: We used fiddler to intercept request and response to analyze failure scenario. Post analyzing, We got to know that response is in error scenario is "object is moved" and post this response application prompts to login . which should not happen ideally
as correct credentials provided and there is also activity on website (no session/authentication timeout).
Experts, request you to share your take on this ?
Mar 29, 2018 09:04 AM|Brando ZWZ|LINK
Hi Tushar Tale,
According to your description, we couldn't directly find the reason.
I suggest you could enable the IIS details logs to log the details error message.
Details, you could refer to this article.
If you could post more details information, it will be more easily for us to find the reason.
Apr 05, 2018 10:54 AM|Tushar Tale|LINK
I could narrow down to root cause with deep analysis of fiddler logs. Find is Selenium IE driver can create issues when application code use "Window.Open". Selenium IE driver loose hold on cookies and post "Wondow.Open"
call, cookies are lost which carries session information leads to force user to re-login.
We tweaked Selenium script initialization code which essentially kills all IE instances & This fixed the issue.
I spent quite some time in fixing this issue; Hope this answer will help someone in future.