Lync & Remote Desktop Connections, Revised - automation

I originally submitted this question, but I ran into the same problem I had before and realized I was asking the wrong thing. (For whatever reason I thought the issue was me being logged into two computers.)
Situation: When the receptionist goes to lunch, I sit at her desk and connect to my computer remotely. However, she locks the computer rather than logging off, so she is still signed in to Lync. From what I understand, Lync is not designed to support multiple users logged into one work station at a time. This is apparent in that I receive calls, but cannot answer them--the "notice" pops up on my screen, and then disappears when I pick up the phone.
My first thought was maybe there was a way to configure her computer to log out of Lync when the computer locks, and then log back in when she unlocks it. (Like how you automatically log out when you shut down, and (have the option to) automatically log in when you start the computer.) Does this sound feasible?
Any other suggestions/methods are welcome as well. I know this could be easily solved by her logging out of Lync when she goes to lunch, but doing it automatically would be better in case she forgets. (There are other situations where she might leave and I sit at her desk that can come up suddenly, too, so it's even less likely she'd remember during those.)
Thank you.

Using the Lync Client SDK to close Lync (MSDN) would force a sign out,and would also make the singing in a bit easier as you could just invoke the Lync exe and it will sign you in automatically. It also avoids you running into any multi-instance problems that might happen if you have instances of Lync running on the machine, one signed in and one not.
I've never tried, but I'm sure a .net app could react to the computer being locked/unlocked. There must be a sign-in state or something?

Related

How to debug Office add-in running in Citrix environment?

I have a VSTO-based PowerPoint add-in that runs fine on Office 2007 and Office 2010. I have users running this add-in every day, day-in, day-out.
I'm now working with a new client that uses Citrix for their desktops. I've never really understood exactly how Citrix works, but it appears that no-one has locally-installed software - they just run everything off the Citrix box. It's a very locked-down environment. They use Office 2010 and what appears to be Vista.
Anyway, my add-in is exhibiting strange behavior in this environment. Simply clicking one of my buttons on the ribbon sometimes gives an error (if the "Show addin user interface errors" setting is ON). The error says "An error occurred when calling the callback "ButtonClick".
Other times, clicking the button appears to have no effect at all (although I suspect that it's actually starting to do something and then crapping out before displaying any messages).
I'm confused, because (a) it works elsewhere, and (b) I catch and report exceptions in all my button-click handlers, so I would expect to see an error reported.
Because the environment is so locked down, and it takes literally weeks to get a new version of my add-in rolled out, I don't know how to diagnose this.
Any ideas?
Have you ever used RDP to remote into another Windows machine? To all intents you can consider Citrix to be a much fancier version of RDP. So you have a bunch of servers where users run their apps and desktops, and they connect remotely to them using HDX instead of RDP.
Your customer could be using XenApp or XenDesktop. In XenApp the users run their sessions on Windows 2008 R2 servers, with multiple users sharing each server. XenDesktop is similar except instead of connecting to a server OS, the user connects to their own dedicated workstation image. At a guess your customer is probably using XenDesktop since you say they are running on "Vista".
Diagnosing your problem is going to be tricky without access to a Citrix environment. For my debugging I'll generally install the remote debugging agent on the Citrix machine and debug remotely from my workstation. Occasionally I'll use Windbg or Visual Studio installed directly on the Citrix machine. If your customer is willing to give you access to their environment you can try this.
Other options include:
Add diagnostic tracing to your product.
Citrix provides some compatibility testing services, see: http://citrix.com/partner-programs/citrix-ready/test.html
As to what might actually be going wrong, Citrix does a range of hooking that can cause unexpected behaviour. For XenApp in particular the multi-monitor hooking is the main cause of things going wrong (I am not sure if this applies to XenDesktop as well). If you do a Google search on "citrix disable hooks" you will find a range of links that describe how to disable hooks using the registry. Disabling the hooks in this way certainly works for XenApp. I am not so familiar with XenDesktop, so I don't know if the same techniques apply. I'd certainly recommend trying disabling hooking for PowerPoint to see if your issues go away.

Lync & Remote Desktop Connections

Situation:
My organization has "Unified Communication" with Microsoft Lync. I occasionally have to sit at another desk, so I use a remote desktop connection to continue using my usual computer. This means I have to log out of Lync on my usual computer so I can log into Lync at the other one. When I return to my usual computer, I never remember to log back into Lync.
Question:
Is there a way I can automate the process? Like, can I do something so that every time I start a remote session with my usual computer, it automatically exits Lync, and every time I end a remote session it automatically starts Lync up again?
My experience is limited to simple batch files and Visual Basic, but I'm pretty good at learning just enough of something to do simple tasks.
Any input is appreciated. Thank you.
Lync will let you log in to multiple devices simultaneously, or end-points as Microsoft calls them. If your usual computer is locked, that device should "detect" you as away. If you are logged in to another computer, THAT one will display your presence as Available, unless you manually change your status.
There is no reason to log off of the usual computer.
Do you really need to log out of Lync at your usual computer? Lync lets you sign in to multiple devices, and will generally do the right thing in ensuring you receive any IMs/calls.
So when you switch machines, you could just sign in on the new machine, leaving the old logged in.
Or is there a specific reason why this doesn't work for you?

Can a MAC address be used as a reliable part of a rights management (DRM) scheme?

We're currently writing some software that we want to protect. We thought that registering a user's MAC address in a database upon activation of the software seemed viable; we can profile and grab that with a Java applet, (is there a better way?) so getting it isn't too much of a problem. However, we want their computer to only run the application, and download application files/updates from the server when their MAC address has been verified with their one on-file. We understand that this means a lockdown to one computer, but special changes can be made on request.
What would be the best way to verify their MAC address, to see if it exists in the database, and then serve them the files to run the application? (And to simply run it on subsequent requests, to prevent re-downloading.)
As the comments to the question indicate: no, you cannot use a MAC address effectively for Digital Rights Management (DRM).

WCF: Debugging service through Terminal Services

I'm part of a distributed development team. We all work through terminal services, accessing a remote server where our applications are located.
We're working on a project in which a client application consumes a WCF service, which exposes all the business logic functionality.
In our development process, a developer is often asked to develop an entire use case from user interface to database access, including the service and the business logic.
In such cases the developer must be able to debug the functions/methods on the server side that she/he has build for a given use case. The problem with that is that the service must be run and when another developer needs to debug his/her work, an exception is thrown (I think it is 'AddressAlreadyInUseException' not sure) and the 2nd developer is not able to perform any kind of debugging at the service. This happens even thought we (off course) have different windows usernames and hence we are working in different sessions.
It's still possible for the client app. to continue working with the 'original' service instance since we're catching the exception at the service, but debbugging is impossible. And if the first developer stops the wcf service then the app. fails.
I would like to know if you could have any recomendation for us. My be there's some sort of tool available (even if we must pay for it) that could somehow isolate each developers' workspace at the server... or may be we just need to change something in the way we work.
I would be very grateful for any kind of advice or clue.
Best regards,
Gonzalo
I would recomend that each developer had their own copy of the server services.
When we develop, each developer has a full environment on their machine. As things are completed, they are checked in to the version control system. When the other developers get the lastest version, new functionality is spread to the other developers.
If I understand your setup, all developers are working against the same server, in this case a programming error of one developer will stop all development.
Hey man, the debugger connects through IP communication. That means if a service or process binds a listener, no other service or process can bind this IP port a second time.
That is the reason for throwing the exception.
In Citrix you have the Virtual IP configuration.
You can also consider to place a VM on the server that serves only for one developer. This would also solve this problem

Terminal Services Servers Information

I was wondering if anyone had some good general information on windows terminal services and how it works.
I'm wondering:
If a DLL is loaded into memory is it available for all users or reloaded for each user. (or does it depend on something else)
A specification for an example server and how many concurrent users it supports with general use....
Any issues with them, I used one a while ago and we had sporadic freezes for a few seconds every so often. This could not be tracked down to a network issue someone suggested something to do with remote printers being attached to the system. It really annoyed users seemed to happen often when going to the start menu.
Is 2008 a big upgrade in terms of performance to 2003
Terminal Services is simply like a server with multiple "remote desktop".
DLL is not shared between sessions, just like ordinal process.
You need a special license if you want to use standard Windows server
I suggest removing all the printers when you want to use it (you can also disable them in client side), but that's not a big issue
2008 is far better for performance and security, but you'd also need more recent RDP clients.