473,659 Members | 3,277 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("W Script.Shell")
Response.write( Server.MapPath( "Program.ex e"))
wshell.run Server.MapPath( "Program.ex e")
set wshell = nothing
%>
This runs the program however, I receive this error:
System.TypeInit ializationExcep tion 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 3665

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**********@g mail.comwrote in message
news:11******** **************@ f16g2000cwb.goo glegroups.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("W Script.Shell")
Response.write( Server.MapPath( "Program.ex e"))
wshell.run Server.MapPath( "Program.ex e")
set wshell = nothing
%>
This runs the program however, I receive this error:
System.TypeInit ializationExcep tion 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
5049
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 *************************************************************** Set connectionToDatabase=Server.CreateObject("ADODB.Connection") connectionToDatabase.ConnectionTimeout = 60 connectionToDatabase.Open "DSN=Customer;user id=SA;password="
2
2218
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 any of the response.write lines from inside the sub. ******************************************* <%@ Application Language="VB" %> <script runat="server">
18
6142
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 src = "SELECT Count(*) FROM reviewer INNER JOIN pp_officer " & _ "ON reviewer.reviewer_id = pp_officer.ppo_rev_id " & _ "WHERE rev_login = 'EllisonL'" Set rL = CurrentProject.Connection.Execute(src, , adCmdText)
3
1951
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 I can write to the output of my page. ....however... The content I wanted to append to the page is aspx code stored in a database
2
5392
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 template column serveral different ways to try and execute a sub function in my code behind and in a class... to no avail. It seems if I use a eval() I need a return.
1
1323
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
2697
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 event I would like to call the table adapter and execute the sp. Note that the sp does not return records. Something like:
7
3448
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 = '" & Trim(strItem) & "'" & _ " AND location = " & intLocation
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8748
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8628
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7359
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.