Atozed Forums
show Active Sessions when executing as a Service - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: show Active Sessions when executing as a Service (/thread-1334.html)



show Active Sessions when executing as a Service - tobenschain - 10-21-2019

Is there a way to show Active Sessions when executing as a Service like it does when run as an app?


RE: show Active Sessions when executing as a Service - kudzu - 10-21-2019

The service app is not interactive which means it has no UI. You can query the session list and show it within a page if you want.


RE: show Active Sessions when executing as a Service - Alexandre Machado - 10-22-2019

This demo does exactly that:

https://github.com/Atozed/IntraWeb/tree/master/15/Delphi/SessionList

However it doesn't show in a form because there is no form (forget about interactive services because they are deprecated).

You can:

a) do like the example below and create an administrative page for your application (it's good to keep it restricted/protected, though)

b) you can create a separate application which communicates with your service (there are several ways to do that) but I'd personally recommend this only if both applications are installed on the same machine


RE: show Active Sessions when executing as a Service - DanBarclay - 10-25-2019

(10-22-2019, 07:29 AM)Alexandre Machado Wrote: b) you can create a separate application which communicates with your service (there are several ways to do that) but I'd personally recommend this only if both applications are installed on the same machine

Curious why you'd recommend only on the same machine.  I snatch a list using a web service, seems to not be a problem.  What am I missing?

Thanks,
Dan


RE: show Active Sessions when executing as a Service - Alexandre Machado - 10-31-2019

Hi Dan,

of course you can expose it via a web service (or using a content handler too).

In that particular case I was considering other ways of implementing it like inter-process communication, mapped memory or something like that. If you are going to expose an administrative interface, I'd just take some extra care regarding user access and security.


RE: show Active Sessions when executing as a Service - DanBarclay - 10-31-2019

Got it. Thanks. Yes, anything we do as web service needs to be secure. I actually just make the request for the info via web service, but the data is pushed through an encrypted log stream. The log pushes to a specific IP, or logs locally if the log server isn't up. Works for me.

I just wanted to make sure there wasn't some landmine hiding in there that I wasn't aware of. I've learned that it's a good idea to understand what you're talking about when you make a recommendation. If I've done something different then I've probably shot myself in the foot. <g>

Dan