How does Citrix DaaS know who is connected to a particular virtual desktop - citrix

How does Citrix DaaS know who is connected to a particular virtual desktop?
The question is related to porting Windows .NET desktop applications (Winforms) to the cloud using Citrix DaaS. These applications must know who is using them, and at present they rely on this .NET call:
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
which returns {DOMAIN-NAME}/{WINDOWS-USER-LOGON}
And what if there are two shifts, day-shift and night-shift, and employees share virtual desktops so that the virtual desktop is not dedicated to a single employee?

As far as I could test and the documentation confirmed:
The current logged on user in .NET with the format 'NetworkName\Username' will be returned with System.Security.Principal.WindowsIdentity.GetCurrent().Name

Related

Is it possible to include calls to the Microsoft Graph API from within a Windows Service application?

We currently have a web application which requires manual intervention in order to initiate the transfer of data from Azure Active Directory (via the Microsoft Graph API) to a local SQL Server database instance for archival and reporting purposes. This manual process is often run multiple times per day.
Our goal is to automate this data transfer process through use of a Windows service application; however, we have encountered an issue with instantiation of the Microsoft Graph client. The vast majority of the documentation available seems to presume the use of Microsoft Graph with a user interface (which the service app doesn't employ). Methods which work quite nicely with the typical MVC-based C# web application don't sit well within the more limited confines of a Windows service app.
Is this type of automation possible? If so, is there any sort of documentation available regarding the use of Microsoft Graph within a Windows service app?
Any assistance is greatly appreciated.
There is a documentation where is described how to call Graph API from a background service or daemon app without any user interaction. The same way will work for Windows service.
Documentation
Get access without a user

Where to find Mirth applications menu?

In our company we're using the Mirth Connect interface engine to interpret HL7 messages. For high availability we now need to move to a clustered setup, for which I'm reading this page. In that page we get an instruction to select the Applications menu like so:
I'm kinda puzzled here, because where does this application appear? I just have the Mirth Connect web interface and the Mirth Connect Java interface, but this seems to be a higher level system.
Could anybody help me out in where I can find this menu, or of what this screenshot is?
You are viewing documentation for the Mirth Appliance. This is an application that runs on the physical and virtual appliances sold for Mirth applications by NextGen. This requires an appliance license. Those licenses are generally sold with support contracts.

Logging into Outlook using powershell with no user logged on

I was wondering if its possible to create a powershell script to log into a specific outlook mail box and than add the script to the scheduled task so that no user has to be logged on.
If you need to open an arbitrary Exchange mailbox, you can either
Use Outlook Object Model (which cannot be used in a service, such as the Scheduler) to log to a predefined profile (Namespace.Logon) and call Namespace.GetSharedDefaultFolder. If the set of mailboxes is always the same, you can add these static mailboxes to the profile (open them as delegate mailboxes) and access them programmatically using the Namespace.Stores collection. Again, Outlook should not be used in a service/scheduler.
Exchange Web Services - it is HTTP based, so you can use it from a service
Graph - just like EWS, it is HTTP based, so you can use it from a service
Extended MAPI (C++ or Delphi only). native API used by Outlook itself. It can be used in a service.
Redemption (I am its author - it wraps Extended MAPI and can be used in any language from a service). It lets you dynamically log to an Exchange mailbox using RDOSession.LogonExchangeMailbox / LogonExchangeHostedMailbox (no existing profile required). Other mailboxes can be opened using RDOSession.GetSharedMailbox.
Yes, you can log on to a specific user profile programmatically. The Logon method of the Namespace class logs the user on to MAPI, obtaining a MAPI session.
Be aware, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. You can read more about that in the Considerations for server-side Automation of Office article.
Instead, you may consider using a low level API on which Outlook is built - Extended MAPI. Or use any third-party wrappers around that API.

API access to PowerShell Web Access?

PowerShell Web Access allows you to run PowerShell cmdlets through a web browser. It shows a web based console window.
Is there any way to run cmdlets without typing them in to the console window? And is there any way to get the results back?
I'm envisaging an app that lets a non-technical user restart a print queue (for example) without having to know PowerShell. The app would display a list of print queues and then the user could select one and restart the queue. The app would essentially be a wrapper that takes care of the syntax and variables so that users don't need to know.
Is there a way to do that through PowerShell Web Access? Or is there some other way for a non Windows app to send arbitrary commands to a Windows server without reinventing the wheel?
Not with PowerShell Web Access**. That is designed for an interactive session.
There are a few ways you could do this. All examples are illustrative and may be outdated, insecure, etc.
Create an ASP.NET web application running C#. Run PowerShell in the C#. Use PowerShell remoting as needed. Example.
Create GUI applications using Windows Presentation Foundation or WinForms. Use PowerShell remoting as needed. Example.
Create a services with an API (e.g. REST) that PowerShell can hit.
** OK, I lied. Create a clunky solution that uses delegated, constrained endpoints accessed through PowerShell Web Access.
For each of the above solutions that uses PowerShell remoting, consider delegated and/or constrained endpoints. Example.
We have a web application that allows certain users to perform certain functions with certain parameters. Uses ASP.NET backed by C# with a set of predefined PowerShell scripts and configuration of who can do what stored in a SQL DB. For example...
Jane can restart application pool X on server Y.
John can restart service Z on server Q.
IT Support can unlock their own 'administrative' accounts from their standard accounts.
All of this can run from non-Windows computers. Some of it might be carefully exposed to allow use on Mobile devices : )
If you have the use cases, the small overhead of designing the system and writing the code behind it will pay off quite quickly.
Cheers!

Surface, Metro, WinRT, MongoDb

We are looking at creating a native client for the Surface (and similar) for our SaaS product. Is it straightforward to create a "Metro" app that can talk to a local instance of MongoDb on that device? I sort of get the distinction between WinRT (which I'm assuming we can't/won't support) and Win 8.x proper. I guess what I'm looking for is confirmation that a "hybrid" app is possible, and that it can be delivered in a reasonable fashion via the app store or similar. Hybrid as in a Windows Store type app, with the database being a mongo as a windows service.
Bonus question: What about Windows Phone (is it a completely different beast?)
I've read a fair amount of documentation but still can't fully grok all this.
You can't deliver a native application via the Windows Store. Windows Store applications must use the WinRT (reference). You'd need to find another (more traditional) mechanism for distributing your application.
What you're describing is just a Windows 32/64 application written in a variety of programming languages that has a style of a "modern" application. The most common for Windows is very likely the .NET MongoDB driver. There is also a C++ driver that will work on Windows, but it's a lot of effort to get it to compile successfully (been there, tried it).
Further, be sure you understand the licensing for MongoDB before including MongoDB in the distribution of your application (it is AGPL).
Most importantly though, MongoDB is not designed or intended to be distributed to end users as it is a server product, not a product for workstations. It doesn't come with an installer, and is designed to be installed by administrators (as it would require port selection, path selection for the DB files, etc.).
I'm not sure why a SaaS application (which I'd think was a web site/cloud/style application that might have a locally installed application) would require a local database like MongoDB. I'd recommend you investigate DB options like SQL compact or Sqlite that could be fully embedded into an application without additional installations if possible.
Regarding your "bonus" question -- MongoDB can't be installed on a Windows Phone. I'd suggest just creating a REST API to wrap usage of MongoDB (or any other DB) and using that API to access a database.
Metro style apps are designed for work on Windows 8 and Windows 8 RT, so I think requeriments are the same.
The problem is you will not be able to use the Mongo Driver because it is not a PCL (Portable Class Library). If I'm not wrong the same is applicated for Windows Phone.
So you would have to develop your own PCL Driver or wait for one driver developed by MongoDB people.
EDIT
About #WiredPrairie's advice and MongoDB distribution, if you need a NoSQL database included with your application, you can try with RavenDB. It has an Embedded version.