Solved

How can I run the Remote Desktop Connection hidden or not display any error messages?

Posted on 2009-06-29
10
855 Views
Last Modified: 2012-05-07
When certain conditions are met, the program I have created runs a RDP file. The entire purpose of this RDP file is to run 1 single program on the terminal server and once that program has completed, to shut down the RDP connection (not coded yet). It is very possible (and likely) that the client may already be logged into the same terminal server through RDP (using a different user name than what is in the RDP file).

I currently am trying to figure out the best way for the following:

Is it possible to run the RDP file hidden or at least minimized/not focused so that it would not affect what the client is doing - making the client unaware this is happening would be best.

What is the best way to terminate the RDP connection after the program is completed?
My current setup allows the session to last 1 minute before it displays a warning that you have 2 minutes to save your files before the session ends. I would prefer not to see this error message at all and after the 1 minute is up just end the session and close down that particular RDP.

I've created both parts of this program:
The program that runs the RDP from the client when certain conditions are met and the program that the RDP runs after logging into the terminal server.

I want this to all happen in a way that the client is completely 100% unaware that it is happening. What is the best way to go about this?
0
Comment
Question by:JohnnyBCJ
  • 5
  • 5
10 Comments
 
LVL 8

Expert Comment

by:Volox
ID: 24748304
Does the application have to run through RDP?  Or could you use a different method such as RPC or remoting to trigger the application?  Just thinking that some other method might be an esier way to make this more transparent to the user and avoid consuming all the resources that are required on the server when a client establishes a remote desktop session.
0
 

Author Comment

by:JohnnyBCJ
ID: 24763367
I've never really thought of a different way of doing this but I'm definitely up for suggestions.

The purpose of using RDP is to simply upload a .txt file that contains 1 line to the server. Nothing more, nothing less. After the transfer is completed, I want to end the connection.

I've also thought about having a FTP on the server but my worries there are about security and exploits if someone by chance finds out the user name and password for the FTP. I do know that you can set permissions to the folder(s) in the FTP but it still worries me. At least through RDP after 1 minute their session would be disconnected. I wonder if there is such a time limit that you can set on a FTP before the user gets disconnected?

How would I be able to setup a RPC for this? Come to think about it, there must be an easier (and better) way to set this up than by RDP.

0
 
LVL 8

Expert Comment

by:Volox
ID: 24774081
If all you are trying to do is put a file onto the server, I would use FTP, a windows share, or a post to a website.  In fact, if you are worried about security, you could use HTTPS on the website.

I guess I'm not quite sure how having someone find out the user name and password for an FTP server or website would be any more of a security risk than having them find out the user name and password for an RDP connection?  Either way if it's something you have stored on the client side you would want to store it with some form of encryption so it at least isn't 'easy' to decipher.

If you are trying to trigger something to run on the server, I would recommend a remoting call or web service call.  If you're on the newer versions of .NET you can even use the built-in security features of web services.

Long story short, I don't think automating RDP is the best or easiest way to get what you want accomplished.
0
 

Author Comment

by:JohnnyBCJ
ID: 24785554
Well in all reality, all I'm trying to do is simply get a string (at a max of 16 characters) from the client to the windows 2003 server that they currently use to connect to by remote desktop connection.

I would love to figure out how to have it setup via remote call. I think that would be the best. Like most things, it's easier said than done.
0
 
LVL 8

Expert Comment

by:Volox
ID: 24786251
For that I would definitely recommend web services.  To put in layman's terms, web services are web pages that perform a specific function (rather than having a user interface) and you talk to them via XML.  The .NET framework has a robust set of objects that make creating the web services and using them quite simple.  You basically develop a method (presumably with the string as the parameter) and mark it as a web service method, then deploy it to IIS on the server.  The web service method can do whatever you want it to do to put the sting information whereever you need it.  Your client then connects to and calls the method.

Here are some starter articles if you need them, but your best bet is to look up information that is specific to whatever version of .Net you are working in since the specifics of web services have changed a bit between 1.1 and 3.5.

http://www.15seconds.com/Issue/010430.htm

http://www.codeguru.com/csharp/csharp/cs_webservices/tutorials/article.php/c5477
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:JohnnyBCJ
ID: 24786688
I've made web services in the past but I've only ever used them in development (in class so to speak). In college we never actually took the web service outside of a visual studio project. I have the web service created (and tested). Now I need to figure out what needs to be done to deploy it to IIS on the server ( I got to check if IIS is even installed on the server). Then I need to be able to figure out how to connect to the server from outside. Oh the wonderful things you don't learn in college :-)
0
 
LVL 8

Expert Comment

by:Volox
ID: 24790451
Yeah.  They ought to have a required course "Deployment and Troubleshooting" to teach you how to get it from your dev PC into a 'real' environment.  Good luck with it.
0
 

Author Comment

by:JohnnyBCJ
ID: 24803120
Volox:

 The web service method can do whatever you want it to do to put the sting information whereever you need it.  Your client then connects to and calls the method.


Question:
Is there a way to setup the SBS so that one of the clients can go to it's IP address/page.aspx and go to a specific web page hosted on the SBS?If so what would be needed to set this up? I thought that the SBS would only be able to host an intranet (or internal website) and not one that a client would be able to connect to from outside the network via  http://IPAddress/index.aspx

Please clear this up for me. Thanks!
0
 
LVL 8

Accepted Solution

by:
Volox earned 500 total points
ID: 24804796
So we are sort of boardering on a completely different set of questions here and I can't say that I'm an expert in the SBS platform, but I will try to answer your question...

From the perspective of 'can you do it' yes, you should be able to setup SBS to host web content.  However you do need to be concerned about security.  From a security perspective, I would be very careful what you expose to the internet, but since it sounds like you have RDP exposed to the internet, maybe that isn't an issue in your case (personally I wouldn't risk doing that).  The safest way to lock these things down would be to keep them internal and require users to VPN into the network to use them.  If you do have to host these things to the outside world, then I would do a few things...
1) Consider hosting the web services on a port other than port 80 so that it doesn't look like a public website
2) if you do end up hosting on port 80, use a robots.txt file or similar to avoid being searched by search engines (http://www.robotstxt.org/)
3) host your services under something like http://IPAddress/services/app123/myservice.aspx  and then lock down the permissions on the site so that people cannot browse directories and don't put links over to the service (this is sort of a security through obscurity kind of measure but if attackers don't know the service is there they will be a lot less likely to try to hack it)
4) Implement security on the service so that you are running over SSL and have some sort of authentication

I know there is lots of content out there on the web and probably on experts exchange on best practices for setting up and hosting web applications and services in a secure manner; and I obviously can't repeat it all here.  

Of course, beyond just getting your server setup to host the service, you may also have to open (or forward) a port on your firewall depending on what yoru deployment scenario looks like.  So that might be why you can't currently expose the page to the outside world.
0
 

Author Closing Comment

by:JohnnyBCJ
ID: 31597874
Thank you for your help. I greatly appreciate it. People like you make Experts Exchange exactly what they are. I applaud you.

I've changed my mind on how to set this up. I managed to set this up through *drum roll please*... email. 2 Ends, one for the client that sends the info and the other constantly checks the email and if certain conditions are met, it reads the email and creates the file.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article will show, step by step, how to integrate R code into a R Sweave document
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now