Run server exe from ASP (newbie)

I have something that should be simple, but my unfamiliarity with .NET and web programs is bothering me. I am an old-school C programmer who has recently been programming ASP and ASP.NET for an e-commerce site.

I have an ASP program that synchronizes 2 databases. I also have a VB.NET program compiled to EXE that populates the source database before synchronization happens. At heart, I know that I will be able to link VB and ASP.NET programs along with the strong side of .NET. Alternatively, if I could run EXE from ASP, that would be just as good for my project. I have a source for both programs. The ASP script was written using a text editor - VB was in VB 2008 Express.

Suppose I don’t know anything about linking assemblies, etc., because I don’t do this - I just read this in an article. I would prefer ASP, but if necessary, I could use the ASP.NET script to run the EXE. The code is legacy ASP with VBScript, so all of our ASP.NET stuff is like VB. C # makes my head a different programmer hurt, so for his sake it will remain VB.

Is there a way that I can relatively easily start pre-synchronizing an EXE program and starting it when I run the ASP synchronization script?

Server MS Windows Server 2003 SP2 / IIS 6.0 / version .NET 2.0.50727.3603. Thank!

By the way, I would like to "learn how to use .NET correctly", but time is not right for this project, and in-depth studies will have to wait.

EDIT: Aaron's answer below gives me most of the path to a solution, but I get:

: System.ComponentModel.Win32 :
: 17: process1.Start();
-?

: , ~/in MapPath -, .

+3
2

// Process, .

System.Diagnostics.Process process1 = new System.Diagnostics.Process();

// ,

process1.StartInfo.WorkingDirectory = Request.MapPath("~/");

// ,

process1.StartInfo.FileName = Request.MapPath("foo.exe"); 

//

process1.Start(); 
+8

, EXE , - , .

+2

Source: https://habr.com/ru/post/1726726/


All Articles