logo

The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.

Notification

Icon
Error

Options
Go to last post Go to first unread
wadi1982  
#1 Posted : Tuesday, October 7, 2014 9:40:44 AM(UTC)
wadi1982


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 9/3/2014(UTC)
Posts: 31
Germany

Was thanked: 1 time(s) in 1 post(s)
Hi.
We are evaluating SC and I want to fully integrate SC in our inhouse Support Software.

Everything looks great, but now I want to do simple thing, and it doesn't work.

I have a Delphi Software which is for our Support.

I can start a session over a HTTP request.
If the result is 401 I offer the credentials to the server an the session is created.
Cookie handling and so on works great so the user don't have the reauthenticate again.

So far so good.

Now I want to logout the user which is authenticated.
So I call an URL like

http://XXXXXXXXXXXXXX/App_Extensions/InternalConnector/InternalConnector.ashx/Logout

The function looks like

public void Logout()
{
Elsinore.ScreenConnect.FormsAuthenticationModule.Logout(HttpContext.Current);

}

But it seems not to work. If I call this the user can create sessions and not have to reauthenticate.

Is there a other way to do this ? Or must I perhaps set manually the ASPXAuth Cookie to "invalid" ?

Hope you understand what I mean.

Scott  
#2 Posted : Tuesday, October 7, 2014 12:57:54 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,862
United States

Thanks: 3 times
Was thanked: 351 time(s) in 303 post(s)
I haven't personally tried it, but I know the log out button just calls the following function:

Code:
SC.util.sendToLogin(SC.types.LoginReason.Logout);
ScreenConnect Team
wadi1982  
#3 Posted : Tuesday, October 7, 2014 1:12:18 PM(UTC)
wadi1982


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 9/3/2014(UTC)
Posts: 31
Germany

Was thanked: 1 time(s) in 1 post(s)
Hm. How can I use this in the ashx File ?
Scott  
#4 Posted : Tuesday, October 7, 2014 7:06:15 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,862
United States

Thanks: 3 times
Was thanked: 351 time(s) in 303 post(s)
There might be a cleaner way of doing this, but using the following in an ashx file effectively ends the current user's login.

Code:
Elsinore.ScreenConnect.FormsAuthenticationModule.Logout(HttpContext.Current);
ScreenConnect Team
wadi1982  
#5 Posted : Wednesday, October 8, 2014 6:12:28 AM(UTC)
wadi1982


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 9/3/2014(UTC)
Posts: 31
Germany

Was thanked: 1 time(s) in 1 post(s)
Hi.
Thanks. It looks like a Delphi issue.

The authentication in Delphi has a "Clear / reset" function which did not do what it should.
So after a "clear" the credentials already stored and it reauthenticates the user.
If I manually clear the credentials in Delphi the session is really ended ;-)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.