C
cschnick@premier-us.net
Guest
I have a Sitefinity 11 implementation where we have a page that has several custom widgets on it. Each of these widgets gets data from an application data source (not sitefinity). If a user sits on this page a LONG time such as locking their computer and going to lunch, the session effectively times out. If the user clicks on a button on one of the widgets that would trigger an action to get data from the data source for that controller for that widget, we can detect that the session is no longer valid by looking at the LoggedInUser as such: readonly Telerik.Sitefinity.Security.SitefinityIdentity LoggedInUser = Security.GetCurrentUserIdentity(); With this LoggedInUser, we can ask: if (LoggedInUser.IsAuthenticated) { //.... do something normal like get the data they need } else { //.... we would like to redirect back to the page this widget is hosted on to force login } What we would like to do is handle the other side of that if statement by redirecting the user back to the page this widget is located on which would trigger the login process and would redirect back to this page after the user logged back in. How do we trigger the redirect? I have tried: var redirectURL = "/myRoot/myPage"; Response.Redirect(redirectURL); Which seems to cause the widget to disappear off the page but does not result in a redirection. I have tried substituting a URL to a different page on the site and get the same result. Thanks, Chris
Continue reading...
Continue reading...