I have an asp.net application that invokes two other J2EE applications. The user signs into the ASP.net application and clicks on a link to take them to the J2EE application. There is another link on the J2EE application that brings them back. Once the
user clicks on signout in the asp.net application I want to invalidate the sessions on the other two java applications. I want to invoke the Signout function on those two applications as well. Does anybody have any ideas how this can be achieved?
Are these ad-hoc pages in the other app or do they follow some protocol?
You'd need to find out what URL is the logout for those apps then just render <iframe> to the logout URLs if you want to automatically log them out. Or you can prompt the user, and then render the <iframe> or just redirect them there.
Problem with the above code is that it will redirect me to the
one page and no way for me to get back to the initial login page. I want to be able to call those two urls within the signout button without leaving that asp.net page. How can i do this with iframe?
I was thinking that I would be able to call and HttpWebRequest and it would work but this doesnt work. Do you have any idea how I can get something like this to work?
You will have to do this from the context of the browser -- these endpoints will remove the user's authentication cookie. You won't be able to invoke this from your server side code.
dchauhan
0 Points
21 Posts
Calling an Asynchrounous Process from .net code to execute servlet functions
Feb 21, 2013 11:41 AM|LINK
I have an asp.net application that invokes two other J2EE applications. The user signs into the ASP.net application and clicks on a link to take them to the J2EE application. There is another link on the J2EE application that brings them back. Once the user clicks on signout in the asp.net application I want to invalidate the sessions on the other two java applications. I want to invoke the Signout function on those two applications as well. Does anybody have any ideas how this can be achieved?
Thanks.
BrockAllen
All-Star
27516 Points
4897 Posts
MVP
Re: Calling an Asynchrounous Process from .net code to execute servlet functions
Feb 21, 2013 12:09 PM|LINK
Are these ad-hoc pages in the other app or do they follow some protocol?
You'd need to find out what URL is the logout for those apps then just render <iframe> to the logout URLs if you want to automatically log them out. Or you can prompt the user, and then render the <iframe> or just redirect them there.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
dchauhan
0 Points
21 Posts
Re: Calling an Asynchrounous Process from .net code to execute servlet functions
Feb 21, 2013 12:39 PM|LINK
I have the URL's they are my own applications. They have a signout function in the servlet. I wasnt to.
My code in the action button of asp.net signout function is as follows.
String url = http://localhost:8080/javaApp/login.do?method=SIGNOUT;
String url2 = http://localhost:8080/javaApp2/login.do?method=SIGNOUT;
Response.Redirect(url, false);
Problem with the above code is that it will redirect me to the one page and no way for me to get back to the initial login page. I want to be able to call those two urls within the signout button without leaving that asp.net page. How can i do this with iframe?
dchauhan
0 Points
21 Posts
Re: Calling an Asynchrounous Process from .net code to execute servlet functions
Feb 21, 2013 12:47 PM|LINK
I was thinking that I would be able to call and HttpWebRequest and it would work but this doesnt work. Do you have any idea how I can get something like this to work?
String url = "http://localhost:8080/MatrixFrontLine/login.do?method=SIGNOUT";
HttpWebRequest objWebRequest = (HttpWebRequest)WebRequest.Create(url);
objWebRequest.Method ="Post";
objWebRequest.Timeout = 100000;
BrockAllen
All-Star
27516 Points
4897 Posts
MVP
Re: Calling an Asynchrounous Process from .net code to execute servlet functions
Feb 21, 2013 12:52 PM|LINK
You will have to do this from the context of the browser -- these endpoints will remove the user's authentication cookie. You won't be able to invoke this from your server side code.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/
dchauhan
0 Points
21 Posts
Re: Calling an Asynchrounous Process from .net code to execute servlet functions
Feb 21, 2013 04:02 PM|LINK
Do you have a suggestion on how I can accomplish this?