Execute asp.net .exe from classic ASP.

U

UnglueD

Hello.

I have written a console application in ASP.NET that will move an
order from a website database and send it to an ERP database. Nothing
special here, just reads from the database and calls a webservice I've
written to add it to the ERP database.

What I want to do now is have this .exe run whenever an order is
created on the website. The website was written in classic asp. And I
have been playing around with calls to the compiled .exe like so:

<%
set wshell = CreateObject("WScript.Shell")
Response.write(Server.MapPath("Program.exe"))
wshell.run Server.MapPath("Program.exe")
set wshell = nothing
%>


This runs the program however, I receive this error:
System.TypeInitializationException occurred. When I try to debug this
using VS Just-In-Time Debugger I get nothing more than <program name>
threw an exception.

One lead I have would be that I just copied the .exe into the website
directory and tried calling it from there. Would I need to copy .dll's
and folder structure or does .NET compact everything it needs into the
released .exe

Other thoughts/suggestions welcome.

Thanks!
 
U

UnglueD

We already have this processin place and a call to the exe would be all
thats left. Mind you this is supposed to be a temporary fix, as we are
re-implementing the websites to go directly to the ERP.


Out of curiosity though, I downloaded the solution and began looking
into how I would apply it to my scenario. I noticed you replied in the
actual article and i'm guessing have implemented this yourself. How
would you suggest I go about implementing this for my situation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top