run .net consolapp out of a cgi script

Posted by Nico on Stack Overflow See other posts from Stack Overflow or by Nico
Published on 2010-03-31T09:36:26Z Indexed on 2010/03/31 9:43 UTC
Read the original article Hit count: 576

Filed under:
|
|

Hello there,

i have written a simple cgi python script which looks like this

#!c:/Python25/python.exe -u
import cgi
import os
def main():
    print "Content-type: text/html\n"
    form = cgi.FieldStorage()
    print form["firstname"].value
    os.execvp("D:\\path\\to\\my\\consolapp.exe", [""])

    main()

As you can se i'd like to start a consoleapp which i have written in .net.

But my consoleapp crashs when i call the cgi script. So i did a little debuging and write a text file after some actions i do in my .net program.

The result was that my programm crash everytime i'd like to open a access mdb file. It told me that i need the Microsoft Data Access Components (MDAC). But i cant belive this message because my .net consoleapp runs without errors if i start it from my own.

So can anybody give me some advise how i can call my .net consol ab through a webscript.

I'm happy for every advise So it don't have to be a solution using a cgi script.

Regards, Nico

© Stack Overflow or respective owner

Related posts about cgi

Related posts about .NET