| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| kalanmaksa -
 
 
 Joined: 03 Jan 2003
 Posts: 5
 
 
 | 
			
				|  Posted: Fri Jan 03, 2003 10:34 pm    Post subject: .NET VB EXE |   |  
				| 
 |  
				| 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 |     | 
	
		|  | 
	
		| aprelium -
 
 
 Joined: 22 Mar 2002
 Posts: 6800
 
 
 | 
			
				|  Posted: Sat Jan 04, 2003 1:44 am    Post subject: Re: .NET VB EXE |   |  
				| 
 |  
				|  	  | 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:
 
 %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 |       | 
	
		|  | 
	
		| kalanmaksa -
 
 
 Joined: 03 Jan 2003
 Posts: 5
 
 
 | 
			
				|  Posted: Sat Jan 04, 2003 9:35 am    Post subject: |   |  
				| 
 |  
				| Ok thank you ill do some reading ;-) |  | 
	
		| Back to top |     | 
	
		|  | 
	
		|  |