How can I automatically portforward and use RDP? - c#

The end goal is to connect to a computer through the internet not over LAN with an IP.
Let's say I have the program that allows a user to connect to it on one computer (server)
And the program that connects to the user on another computer (client)
On the client program, I have...
microsoft terminal services active client 1.0 and I'm trying to get that to display the screen of the computer that is running the server.
I've read that I have to get portforwarding done first of all and I can't seem to even figure out how to do that dynamically.
I'm just a bit overwhelmed is all. Any ideas on how to first start portforwarding dynamically? Or is there any other way?
I'm trying to do this in VB.NET but I understand C# as well so any examples in either code would be great!

I found an alternative of what I wanted to do but better.
I'm using this DLL
https://cdot.senecacollege.ca/projects/vncsharp/
and I'm also using
http://converter.telerik.com/
to convert from C# to VB.NET

Related

What are the purposes of these three connection options for printing the label in ZPL?

I have these three radio button inside the group box named Printer Connection in the windows form:
a. Network
b. Serial
- dropdownlist
c. Web service
User has to choose one of the option from above before printing any labels or clicking the button Print Label. If someone would explain about the purpose of web service and the scenario how it can be utilize to connect to the printer and printing label. Thank you!
It is hard to understand what app you are using but I have to imagine you are using something based off of the Java SDK by Zebra. In this SDK there is a Web Services SDK. It comes with a .war file that gets added to a Tomcat server. Printers have a set of settings which when configured will have the pritners establish a connection to the server with the .war file installed. Once the printer has connected you can use the Java SDK functions to communicated with the printer from that server.
This explanation is probably over simplified, but if you look through the help documentation on the SDK you will probably get a better explanation.

c++/c# app to connect to linux server

I am planning to do an App either in c++/C# (through Visual Studio) in Windows 7.
OK what this app does is it will accept input through studio elements like text box or buttons ..then it should create an command based on input and run these command on the Linux server.
E.g : One simple example is to restart a certain process on a Linux machine
Now to proceed to my problem:
How do I connect my App to Linux machine?
I don't want to install any third party application as i am not allowed to do so.
If possible please list me the different ways i can do this
Well, you can do this. I am already familiar with this scenario. I have several application setup working this way. The only option that will allow you to do this without any 3rd party application is using SSH protocol.
The SSH protocol is the well known and most power full tool of linux sysadmins. You can execute any command over it on a linux box from any part of the world or any piece of shit which can run an SSH client. Ask me on comment if you need more info on this.
EDIT
One example, if you want to restart certain process.. You can pass the command over SSH as below.
ssh user#server_ip '/etc/init.d/httpd restart"
The above will restart the HTTPD(Apache) service.
Some libraries you can use in .NET
http://www.codeproject.com/Articles/11966/sharpSsh-A-Secure-Shell-SSH-library-for-NET
https://sshnet.codeplex.com/
I have not used above libraries in .Net, Instead I have done several things using linux box with python and bash.
if I understand correctly, to solve this you can implemente WebService.
But when you said :
I dont want to install any third party application as i am not allowed
to do so
I'm afraid you can not setup WebService on Linux server ?
Other possibility, use SSH if already install on linux server (some chance that is) and you probably could find a .Net lib to make SSH
This link will help .Net class to execute remotely on Linux over SSH?

(C# / Window) How to know all request URLs?

I have been developing a project that uses PHP and C#.
We're writing a C# App and installing it on some computers, and a PHP website that manages these computers.
When something is changed on Server. C# App will connect to server and get new updated information that relates to current computer, to do this job C# App requests to server each ten seconds.
My question is "Can I see all requests by on the current computer?" The computer is installed by window 7 or window 8.
Note: I can see all requests by looking in file "access_log" on server. But I want to know whether I can do it in the sending computer or not? Thank you so much.
Or I can log in C# when doing a request to Server.
(Sorry about my English)
You can use Fiddler to monitor all traffic leaving and returning to your computer over port 80.
Also, you can add logging to your C# program to log anything you want to a file, and then review the log later.
By default, the requests you make in C# won't be logged to a system event log or anything like that.

C# Use/connect to MySQL database in webhost (One.com)

I want to connect to my one.com webhost, by using my C# winforms application. The support said extern connections is NOT allowed, then how am I gonna read the database table on my webhost? I was told that if I used PHP on the website, then it would work, and it does. But how should i access that code from my program and make it return some values?
Any help will be appreciated. thanks in advance.
PS. If i'm unclear somewhere, or if you need more information then just explain what's needed.
Your webhost has probably restricted the access to your database so that only a specific host can connect to it, namely the one hosting your PHP based website. This is a common practice.
If this is the case, you cannot connect from any other host - and thus, your C# winforms app won't be able to connect either.
So a direct connection from your C# app to your database isn't an option, but you might implement a REST interface with PHP that serves the data you need to the outside world. This could then be accessed by the clients using your C# app. This is the only solution I can think of.

C# Program working with PHP server

Just curious about the best way to go about this. I want to make a webpage that shows the amount of time it takes to ping all the machines on my network. I want a C# program to do the pinging and report it to the webpage. I want to be able to click "Re-ping" on the webpage and the program rerun the test. What is the best way to go about this?
The biggest issue is how to get things from the user to the C# program.
I can make the program post on the server, and the server show the user, like below.
User <----> PHP Host <---- C# Program
However how could I get data to go the other way?
PHP Host ---?-->C# Program
Am I thinking about this all wrong?
I do want the pinging and other things to be handled by a C# program as it has far more complex functionality (threading, connections, etc) than a PHP host that is interpreted as it is requested.
Is it possible that I could let the C# program return pages to users and avoid a PHP server all-togeather?
Any ideas are welcomed.
You have many options. If you want to avoid using a PHP server the simplest would probably be to write a simple http server similar to this. Other options include using ASP.NET with a C# backend, or a webservice, which would be accessed from the PHP script or directly by a client application.

Categories