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
bigdessert  
#1 Posted : Thursday, February 17, 2011 10:12:04 AM(UTC)
bigdessert


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 3: Shirt off your back! Received 25 Thanks!

Joined: 9/13/2010(UTC)
Posts: 708
Location: Minnesota

Thanks: 1 times
Was thanked: 44 time(s) in 32 post(s)
I know we can hide sessions from the host page, but was wondering if it was possible to hide them from guest page as well.

So in other words what we would like to do is have this:

www.groupaguestpage.com -> would only see sessions created from groupa user account.
www.groupbguestpage.com -> would only see sessions created from groupb user account.

I am not an asp programmer, but would think like in php you could detect the host url and then create an if/else to show sessions based on the web address. Would you be able to lead me in the right direction to where in the guest.aspx.cs file I would put this if/else statement?
Doing some googling it appears I can detect the url using "System.Web.HttpContext.Current.Request.Path".

Jake  
#2 Posted : Thursday, February 17, 2011 11:56:13 AM(UTC)
Jake


Rank: Administration

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

Joined: 4/9/2010(UTC)
Posts: 2,061

Thanks: 1 times
Was thanked: 393 time(s) in 188 post(s)
Get the host name of the HTTP request with "this.Request.Url.Host" .. that'll give you your "www.groupaguestpage.com"

You'll need to have something in the sessions that you're looking for in order to filter. you can filter based on the Listed Note or the Host.

The line you'll need to mess with looks like this:

Code:
ListedSessions = sessionManager.GetSessions(InvitationType.Listed).Select(s => GuestPage.GetSessionInfo(s, relayUri))


On the end of that line, you'll insert a Where condition, maybe like this:

Code:
ListedSessions = sessionManager.GetSessions(InvitationType.Listed).Where(s => s.Tag == this.Request.Url.Host).Select(s => GuestPage.GetSessionInfo(s, relayUri)).Where()


In this case you'll only show listed sessions where the Note matches the HTTP hostname exactly ... which probably isn't very useful, but I can't suggest much else until I know your scheme.
ScreenConnect Team
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.