.NET VB EXE

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
kalanmaksa
-


Joined: 03 Jan 2003
Posts: 5

PostPosted: Fri Jan 03, 2003 10:34 pm    Post subject: .NET VB EXE Reply with quote

Hey all!

I have made some standalone .exes and they work fine.

My problem is that i dont know how to make web server accept parameters ie: if i want to send something like "/cgi-bin/selectrecord.exe 3774" to web server.

log see it like "GET /cgi-bin/selectrecord.exe%203774" and program doesnt do anything.

I can use selectrecord.exe and add parameters from cmdline and it works well.

Anyone know whats wrong?

I use MS .NET VB console apps.

And second... is it possibe to use windows BAT or CMD as CGI script?

Thanks!
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jan 04, 2003 1:44 am    Post subject: Re: .NET VB EXE Reply with quote

kalanmaksa wrote:
Hey all!

I have made some standalone .exes and they work fine.

My problem is that i dont know how to make web server accept parameters ie: if i want to send something like "/cgi-bin/selectrecord.exe 3774" to web server.

log see it like "GET /cgi-bin/selectrecord.exe%203774" and program doesnt do anything.

I can use selectrecord.exe and add parameters from cmdline and it works well.

Anyone know whats wrong?

You are simply breaking the CGI specification. If you want to pass a parameter, you should send a request such as "GET /cgi-bin/selectrecord.exe&203774" and retrieve 203774 from the environment variable QUERY_STRING. The CGI specification is available at http://hoohoo.ncsa.uiuc.edu/cgi . It is worth reading if you want to write your own .exe CGIs.

kalanmaksa wrote:

And second... is it possibe to use windows BAT or CMD as CGI script?

Hmmm... That should be easy to do but it isn't possible in the current version of Abyss Web Server because you cannot enter a parameter with a CGI Interpreter (you should declare .bat files as handled by command.com or cmd.exe. But those two need an extra /c parameter on their command line to run the batch file.)
This behavior will be fixed in the next version.
An alternative solution, which is easy to do, is to write a program that takes a file name from its command line and run the following command:
Code:

command.com /c %1

%1 contains of course the 1st parameters on the command line. You can declare that program as the one that handles .bat files. That trick works great.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
kalanmaksa
-


Joined: 03 Jan 2003
Posts: 5

PostPosted: Sat Jan 04, 2003 9:35 am    Post subject: Reply with quote

Ok thank you ill do some reading ;-)
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group