CliffC
CliffC

Reputation: 933

Killing a session from another asp.net web application

I have 2 web application hosted in 2 different domain example

  1. WebApp1: www.evs.com
  2. WebAPP2: www.dash.com open in another browser window

What i want to achieve is whenever user logout in WebApp1,WebApp2 user session will be also terminated automatically

i have tried the following solution:

When ever user click on Logout link in WebApp1 it will call WebApp2/Logout.aspx which has a Session.Abandon() at server side. But this does not seems to terminate the session at WebAPP2, any ideas on how to make this work?

Upvotes: 1

Views: 388

Answers (1)

jbl
jbl

Reputation: 15413

On the page you are displaying to the user he or she has logged out successfully, you can put a tiny iframe or img which src should be WebApp2/Logout.aspx.

This way, upon logout in webapp1 you will trigger logout on webapp2

Be aware to return the correct content and content-type (text/html) from the iframe, or (image/...) for the img

Upvotes: 1

Related Questions