I have two applications running on different domains:
- webformapp.com
- mvcapp.com
webformapp.com has an iframe which points to mvcapp.com. Now I want to keep session alive in webformapp.com when there is an activity on mvcapp.com. I have implemented a generic handler(KeepAlive.ashx) in webformapp.com and tried to call from mvcapp.com to keep session alive on webformapp.com, but I guess because of cross domain access restriction, directly calling webformapp.com/KeepAlive.ashx from mvcapp.com through a simple http get / post request isn’t hitting the handler. Solution given here is for same domain I guess. Any simpler solution to implement keep alive mechanism in this scenario?
If I understand your question, the user is actively doing things on The mvc app within an iframe served by the webform app. Are you able to have a javascript timeout post heartbeats to the webform app as long as that browser window is open, from the browser outside the iframe?
Ive done similar things in the past where i maintained a counter in their session and after x refreshes the handler would respond with a failure code which the browser can respond to with a redirect prompt or what have you.