P
pgmanno
Hello all,
Here is my question. I have an AxWebBrowser (hereafter refered to as
"Browser") control framed in a smart client. The smart client requires
logon, and the web app that the Browser is pointing to requires logon
and is using Forms Authentication. I have set up a web service so that
when the user logs on to the smart client, s/he can also log on to the
website (basically, the username/password is passed up, auth ticket set
and a session is established using cookies and the Browser uses those
cookies from that point forward).
My problem is that I want the Browser to be able to gracefully recover
from session expiration. Meaning, I do not EVER want to frame the
website logon page in the Browser, I always want it to be authenticated
from behind the scenes. The mechanism I used initially was creating my
own control that has an instance of a Browser, exposing a Navigate
method in that control which calls AxWebBrowser.Navigate2(), creating
another web service which returns a boolean indicating whether or not
the session is still alive, and on every call to Navigate, checking the
service and re-logging in if the session is not alive. That works just
fine as long as the Navigate method is called on my new control;
however, if the browser is visible, the session expires, and a link is
clicked, the code in the Navigate method is not called, and the Browser
redirects to the login page (since the session has expired). I though
about setting a windows hook to capture left click events and if the
browser is visible, go through the "check session" logic, but that
seems a bit like overkill. Anyone have any ideas how to handle this
issue?
Thanks,
pgm.
Here is my question. I have an AxWebBrowser (hereafter refered to as
"Browser") control framed in a smart client. The smart client requires
logon, and the web app that the Browser is pointing to requires logon
and is using Forms Authentication. I have set up a web service so that
when the user logs on to the smart client, s/he can also log on to the
website (basically, the username/password is passed up, auth ticket set
and a session is established using cookies and the Browser uses those
cookies from that point forward).
My problem is that I want the Browser to be able to gracefully recover
from session expiration. Meaning, I do not EVER want to frame the
website logon page in the Browser, I always want it to be authenticated
from behind the scenes. The mechanism I used initially was creating my
own control that has an instance of a Browser, exposing a Navigate
method in that control which calls AxWebBrowser.Navigate2(), creating
another web service which returns a boolean indicating whether or not
the session is still alive, and on every call to Navigate, checking the
service and re-logging in if the session is not alive. That works just
fine as long as the Navigate method is called on my new control;
however, if the browser is visible, the session expires, and a link is
clicked, the code in the Navigate method is not called, and the Browser
redirects to the login page (since the session has expired). I though
about setting a windows hook to capture left click events and if the
browser is visible, go through the "check session" logic, but that
seems a bit like overkill. Anyone have any ideas how to handle this
issue?
Thanks,
pgm.