Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 739
  • Last Modified:

I want to run a remote application exe from a web browser

How I can run a remote application exe from a web browser.
My application is not on the local network and is linked with a Microsoft Sql Server database.
0
ICOTech
Asked:
ICOTech
  • 5
  • 3
1 Solution
 
abelCommented:
You can start an application with Process.Start, i.e. Process.Start("Notepad"). However, you must be aware that starting processes in that way from the web is potentially dangerous. And even if it were not, you should check somehow the output or result of the application, but that of course depends on what you want to do with it.
0
 
ICOTechAuthor Commented:
The application I want to start is not on the client computer. The client would be using a web-browser, but the application is located on another computer (on another network).

I want the client to remote control the server application form a web-browser. Why?

My application must connect to a remote SQL Server and that client can't have the SQL port open to access it. So im looking for a solution to run the application form a web-browser directly (the server that will host the application will have access to the SQL Server).

Hope this is more clear, and sorry for my english.
0
 
abelCommented:
The code I showed you, well, the line "Process.Start("something.exe") " is meant to be used from a .NET ASP or similar server application.

However, if you want to connect to an SQL server, the preferred method would be not through an extra application, but to write a web page (ASP.NET or PHP or whatever language you prefer) to do the connection to the SQL Server and to perform the task. It is quite trivial to give a user access to it with a textbox where he/she could write an SQL query. Tools that do this (connection MS SQL Server through a web page) are freely available from many vendors or open source projects.

But that might not be what you are after. If you already have an application that does what you want and the user cannot use that locally because of firewall restrictions, I think the simplest to do is creating a web page with a button on it "Start app" and execute the Process.Start command in the code of that web page.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
ICOTechAuthor Commented:
If I use the process.start the application will start on the server and the user will not see the interface? If I start it on client pc then the user wont be able to connect to the sql server (it will be like if the user start it directly from a desktop icon?). I don't see how a Process.Start could help me, did I miss something?

My application is already completed and have alot of screen. The application connect to a SQL Server, but in 1 case, the customer can't reach SQL Server because of firewall and can't open port to access SQL Server.

My objective is to be able to use the existing application and connect to the remote SQL Server. If there a way to remote control the application so that the application is not directly running on the client PC it be nice.

TY
0
 
abelCommented:
Ah, in that case, I misunderstood. In general, if someone wants an application to be started on a server, there's some kind of interface to that application, i.e., through RPC, or through the commandline. Running an application (as I understood your request) is not a problem. Sending messages to the windows of the application and sending the contents of that window back again, that's where it goes wrong, and that's not easy to fix.

The best way, but certainly not a secure way, is thinking of another port that you can use for communications and that you can open on the clients computer. Then you make sure that that port can be used for SQL connections (of course, you'll have to alter the settings of your server too). But, given your original requirement, it seems to be that this approach will not work for you....

Another way, even less secure, is to use some kind of virtual desktop software that allows connection through port 80 (http, internet port). One such client, free of charge, is VNC. I has a service that can work as an http daemon. If the client connects to that (through the browser), it will open up a java application (applet, inside the browser) which is the virtual desktop. Using that, it will be possible to do anything on the server, including starting the application. But, VNC does not use encryption and is not very safe. It is not hard to find out a password and all in all, I can only recommend against it...

Since it is not possible (unless you want to spend a year on coding) to create such a likewise interface yourself in a secure manner, the only two other options left are: opening that port and using your application, or porting your application to become a web application.

I'm sorry, but firewalls are a pest when it comes to these things. If you have a desktop application and you didn't design it from the ground up to be remotely accessible through some API, then all I have is bad news for you...

One last thing comes to mind, but it requires specialized knowledge. It should be able to create a VNC-like opening to your remote computer and to make only the application accessible. However, this is far from easy. I know some people who could pull this off (including myself), but that will require professional (consultancy) services. And once you go that path, you can just as well let them rewrite the interface as web application, which is probably easier and more versatile.

-- Abel --
0
 
abelCommented:
The short answer would've been: your client is out of luck if (s)he can't change the firewall settings... :-(
0
 
ICOTechAuthor Commented:
OK, ty for your time. im currently evaluating XenApp from Citrix that may do the job I want.
0
 
abelCommented:
That's in the same league as VNC (but then commercial ware, of course). If you're ok with that approach, XenApp is an excellent choice.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now