How to listen to new Remote Desktop connections events on the client machine in C#? - remote-desktop

I'm working on a C# app that launches a Remote Desktop connection on behalf of the user. I do that by programmatically running mstsc.exe with the required config to automatically launch the session.
I'd like to know if the connection succeeded or not to handle the potential errors. Is there an event or something like that to notify me that the remote session was successfully opened (or if the connection failed)?
For now I found a few leads:
This interface that seems to expose exactly what I want, but I don't see how to use it
Looking at the Event Viewer in Windows, I found some events that seem to be triggered when the host is unreachable, but I'd like to know if there is a simpler solution than looking for these events:
Event 1026: RDP ClientActiveX has been disconnected (Reason= 516)
Event 1105: The multi-transport connection has been disconnected.
Thanks for your help!

Related

Monaca Localkit Launch Error

When I try to launch the Monaca Localkit application, it shows "Unable to start HTTP server. Maybe the port is occupied. Please change the port and restart the program."
Then, I have changed my port setting many times, but it still shows the same message.
My default port setting is 8001. And I checked whether other application is using this port by netstat command. But no application is using.
I tried to re-install Monaca Localkit application too. But the result is the same as before.
How can I fix this problem? Please give me an advise.
It means that another program is using that port, maybe another instance of localkit? If yes, terminate the program to free the port. You should also check if your firewall allows communications through port 8001.
If you want just to change port, you can open Localkit and go, from the menu bar, to Monaca Localkit -> Preferences and change Listening Port.

Reconnecting WCF clients after a service receive timeout has occured

I have a WCF service which I host inside a WFP application, which acts as one of the clients of service as well. There is one more WPF app which acts as another client for service. After a timeout occurs and clients get disconnected, What is the proper way to clean up resources and connect the clients again. I am trying to create new proxies but I am not able to use them for communication. I know I can increase the recieve timeout on service but I need my clients to be able to communicate always not just for long enough. I have also tried continously sending a message to service at interval but that's something I don't want to go for. What approach is best for continous communication between clients and service? My service might need to be connected to clients for months or may be years.
Any help will be of great value.
Thanks in advance.
You can catch the CommunicationException or something like that and then restore the channel.

Unable to access a simple web application (running on Tomcat Server) from another System

I have written a simple web Application which is running(on Tomcat Server) fine on my local system.But when I tried to access from a different system using http:/my_ip_address:8080/Projec1/My_Application. Its showing this error
Network Error (tcp_error)
A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
I know many of you must be well versed with this kinda error.But for me its kinda new.I would be happy if you state possible reason and solutions(Please tell me if there is configuration is required in Server step wise)
Thanks All
I forgot tell you all that i found the answer of above question, actually there was proxy setting problem.This is what i did
Open internet option in IE.
Goto LAN setting in Connection option.
In LAN Setting there is advance setting tab, click it.
You will see a Exception box at the bottom.
Type the IP Address form which you want access.
eg. 10.200;*.xyz.com
This setting is to be done on system from where you want to access your web application.
Starting IP address where application is running 10.200.---.--- that is why in exception box it is mentioned as 10.200;*.(your Interanet Server Name)
Hope this will help.
Thanks

EndpointNotFoundException on client machine

My WCF Service is hosted under net.tcpbinding and in case it is not running when client makes a call to its methods but let me tell you our some of clients get access and some of not. i even check antivirus setting and firewall setting for each client but haven't came up with right answer , client gets the EndpointNotFoundException with this message:
There was no endpoint listening...
i have check the path of service there is no mistake in path. and in my nettcp service based on window credential type and enabletcpportsharing is also on.
Still searching for right solution.
Thank you!
After trying telnet (IP Address of app server) Port. so i can understand it's blocking by window firewall or router firewall. if telnet open window from client machine that's mean its working and if not opening in window then call Network administrator to open that port
Eg. telnet xxx.xx.xx.xx 80 in command prompt

DevExpress - Show Alert Window for all users in app

We've got a program that runs on our network (it's published to our app-server and run from there as well) and I'd like to show an Alert window (by DevExpress) to all users who are running the app, whenever a new item is entered. Obviously the code would go in the Save event but when I put it in there, it only works for me, meaning I'm the only user who sees the alert, no one else. The same can be said for other users...they only see the alert when they enter it, not when someone else enters it.
Any ideas as to how this can be accomplished?
You can use straight MSMQ to put on a message and have clients listen on that queue. You can also use NServiceBus (which does use MSMQ) that has a publish subscribe framework built in. This way your clients can subscribe to all clients or certain clients.
Since WinXP, Vista and Win7 have MSMQ it just maybe a matter of installation and configuration (which NServiceBus will do 'automatically' for you)
You could try with Comet if you want true push mechanism. Otherwise you could use periodical pull using setInterval and ajax calls. However, both techniques have some performance repercussions.

Resources