473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Execute asp.net .exe from classic ASP.

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!

Oct 30 '06 #1
2 3661

That's a pretty flimsy design.

Here is an option:
Use MSMQ as a "middle man".

Then write a Windows Service to poll the queue.

Here is a nice article:
http://www.eggheadcafe.com/articles/20041204.asp

"UnglueD" <Br**********@gmail.comwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...
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!

Oct 30 '06 #2
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.

Oct 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas Scheiderich | last post by:
Why would you use the Recordset object over the Execute method of getting data from your Sql database. For example, I have the following: Execute Method...
2
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
18
by: Darryl Kerkeslager | last post by:
When I open an ADO Recordset, I close it. However, it seems that there may be some difference in this manner of opening a Recordset: Dim rL As ADODB.Recordset Set rL = New ADODB.Recordset ...
3
by: Ben | last post by:
Hiyo I want to perform a programmatic server-side include, and I think that the best way would be to use Server.Execute(path, optional textwriter). Certainly ommitting the textwriter means that...
2
by: Deere | last post by:
Keep in mind I'm an old guy who is learning .net. In asp classic I had a trash can icon in my shopping cart that would delete a record. In trying to accomplish the same in gridview I've used a...
1
by: =?Utf-8?B?cm1hcmNlbG8=?= | last post by:
Hi,I cannot execute a services windos from asp.net, how execute a services windows from aps.net in windows 2003 server Thank's
2
by: =?Utf-8?B?RGF0YXNvcnQ=?= | last post by:
Is it possible to add a stored proc to a table adapter and execute the proc inside an ASP button click event? I have a table adapter called Claimers and a sp called AddWatch. On the onclick...
7
by: Roger | last post by:
This is the vba code Set db = CurrentDb On error goto fErr …. loop strSql = "UPDATE tblInvAnalysisWhse" & _ " SET ltDeviation = " & Sqr(dblError / intPeriods) & _ " WHERE item = '" &...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.