473,473 Members | 4,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Executing a PERL script from ASP.NET appl.

Hey 2gether!

I'm trying to execute a PERL script on the web server when the user presses
a button in an ASP.NET Web Application using Visual Basic. The most obvious
solution for me seemed to be to use the 'Shell()'-command [Like this:
Shell("C:\\Inetpub\\wwwroot\\BasicDataRequests\\Ro bot.pl",
AppWinStyle.NormalNoFocus, True, 5000)].
This didn't work: Either I get an "File not found" error, or I get no error
at all, but the PERL script isn't executed anyway. The strange thing is that
I managed to execute a .bat file for example. Why the hell can't I execute
the PERL script?
Just to make sure, I also tried:
Shell("C:\\Perl\\bin\\perl.exe
C:\\Inetpub\\wwwroot\\BasicDataRequests\\Robot.pl" ,
AppWinStyle.NormalNoFocus, True, 5000)
... to make sure he can find the PERL-interpreter.

Has anyone got a clue, what the problem is? (Security? Userrights? Wrong
path? etc. etc.?) Or has anyone got a different solution for this problem
(target: Execute PERL script out of ASP.NET appl. using VB)?

I've read that with the PerlASPX module you can run PERL in ASP.NET, but
that costs 295$. Maybe there are any other known, free products..?

Thanks alot in before!
Jul 21 '05 #1
3 4923
You realize that executing applications from web pages is probably a bad
idea, right?

If you can execute the command interpreter then you should be able to run
the Perl one as well, though maybe the issue is quotes around the arguments
or something like that.

If you install ActivePerl you can use Perl in IIS either in "CGI" mode or as
a scripting language in ASP pages or under its own IIS handler (pages that
have the .plx extension).

I'd recommend the latter if your Perl script can run under IIS.
--
Klaus H. Probst, MVP
http://www.vbbox.com/
"PzYon" <Pz***@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Hey 2gether!

I'm trying to execute a PERL script on the web server when the user presses a button in an ASP.NET Web Application using Visual Basic. The most obvious solution for me seemed to be to use the 'Shell()'-command [Like this:
Shell("C:\\Inetpub\\wwwroot\\BasicDataRequests\\Ro bot.pl",
AppWinStyle.NormalNoFocus, True, 5000)].
This didn't work: Either I get an "File not found" error, or I get no error at all, but the PERL script isn't executed anyway. The strange thing is that I managed to execute a .bat file for example. Why the hell can't I execute
the PERL script?
Just to make sure, I also tried:
Shell("C:\\Perl\\bin\\perl.exe
C:\\Inetpub\\wwwroot\\BasicDataRequests\\Robot.pl" ,
AppWinStyle.NormalNoFocus, True, 5000)
.. to make sure he can find the PERL-interpreter.

Has anyone got a clue, what the problem is? (Security? Userrights? Wrong
path? etc. etc.?) Or has anyone got a different solution for this problem
(target: Execute PERL script out of ASP.NET appl. using VB)?

I've read that with the PerlASPX module you can run PERL in ASP.NET, but
that costs 295$. Maybe there are any other known, free products..?

Thanks alot in before!

Jul 21 '05 #2
How about trying Process.Start(). ?

http://cheeso.members.winisp.net/src...e=shellex.aspx
"Klaus H. Probst" <us*******@simulplex.net> wrote in message
news:OH****************@TK2MSFTNGP09.phx.gbl...
You realize that executing applications from web pages is probably a bad
idea, right?

If you can execute the command interpreter then you should be able to run
the Perl one as well, though maybe the issue is quotes around the
arguments
or something like that.

If you install ActivePerl you can use Perl in IIS either in "CGI" mode or
as
a scripting language in ASP pages or under its own IIS handler (pages that
have the .plx extension).

I'd recommend the latter if your Perl script can run under IIS.
--
Klaus H. Probst, MVP
http://www.vbbox.com/
"PzYon" <Pz***@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Hey 2gether!

I'm trying to execute a PERL script on the web server when the user

presses
a button in an ASP.NET Web Application using Visual Basic. The most

obvious
solution for me seemed to be to use the 'Shell()'-command [Like this:
Shell("C:\\Inetpub\\wwwroot\\BasicDataRequests\\Ro bot.pl",
AppWinStyle.NormalNoFocus, True, 5000)].
This didn't work: Either I get an "File not found" error, or I get no

error
at all, but the PERL script isn't executed anyway. The strange thing is

that
I managed to execute a .bat file for example. Why the hell can't I
execute
the PERL script?
Just to make sure, I also tried:
Shell("C:\\Perl\\bin\\perl.exe
C:\\Inetpub\\wwwroot\\BasicDataRequests\\Robot.pl" ,
AppWinStyle.NormalNoFocus, True, 5000)
.. to make sure he can find the PERL-interpreter.

Has anyone got a clue, what the problem is? (Security? Userrights? Wrong
path? etc. etc.?) Or has anyone got a different solution for this problem
(target: Execute PERL script out of ASP.NET appl. using VB)?

I've read that with the PerlASPX module you can run PERL in ASP.NET, but
that costs 295$. Maybe there are any other known, free products..?

Thanks alot in before!


Jul 21 '05 #3
Hi Dino -

I believe the VB "Shell" command is just a wrapper around Process.Start. In
any case if the target EXE has a problem with the command line format (the
Perl interpreter is touchy about this, I know) or he has a permissions issue
or something like that it won't work no matter what.

It's still a bad idea to run EXEs from web processes though =)
--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message
news:u3**************@TK2MSFTNGP09.phx.gbl...
How about trying Process.Start(). ?

http://cheeso.members.winisp.net/src...e=shellex.aspx
"Klaus H. Probst" <us*******@simulplex.net> wrote in message
news:OH****************@TK2MSFTNGP09.phx.gbl...
You realize that executing applications from web pages is probably a bad
idea, right?

If you can execute the command interpreter then you should be able to run the Perl one as well, though maybe the issue is quotes around the
arguments
or something like that.

If you install ActivePerl you can use Perl in IIS either in "CGI" mode or as
a scripting language in ASP pages or under its own IIS handler (pages that have the .plx extension).

I'd recommend the latter if your Perl script can run under IIS.
--
Klaus H. Probst, MVP
http://www.vbbox.com/
"PzYon" <Pz***@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Hey 2gether!

I'm trying to execute a PERL script on the web server when the user

presses
a button in an ASP.NET Web Application using Visual Basic. The most

obvious
solution for me seemed to be to use the 'Shell()'-command [Like this:
Shell("C:\\Inetpub\\wwwroot\\BasicDataRequests\\Ro bot.pl",
AppWinStyle.NormalNoFocus, True, 5000)].
This didn't work: Either I get an "File not found" error, or I get no

error
at all, but the PERL script isn't executed anyway. The strange thing is

that
I managed to execute a .bat file for example. Why the hell can't I
execute
the PERL script?
Just to make sure, I also tried:
Shell("C:\\Perl\\bin\\perl.exe
C:\\Inetpub\\wwwroot\\BasicDataRequests\\Robot.pl" ,
AppWinStyle.NormalNoFocus, True, 5000)
.. to make sure he can find the PERL-interpreter.

Has anyone got a clue, what the problem is? (Security? Userrights? Wrong path? etc. etc.?) Or has anyone got a different solution for this problem (target: Execute PERL script out of ASP.NET appl. using VB)?

I've read that with the PerlASPX module you can run PERL in ASP.NET, but that costs 295$. Maybe there are any other known, free products..?

Thanks alot in before!



Jul 21 '05 #4

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

Similar topics

0
by: SS | last post by:
I am trying to execute some python commands within a perl script and running into problems. The following works: python -c "import mypkg;do this; do that" however when I try to do something like...
3
by: PzYon | last post by:
Hey 2gether! I'm trying to execute a PERL script on the web server when the user presses a button in an ASP.NET Web Application using Visual Basic. The most obvious solution for me seemed to be...
1
by: amaltasb | last post by:
I have few modules which are in perl, and all other scripts are in python. Is it possible to execute the perl scripts within python or import them like: Thanks
2
by: sunilsn | last post by:
Hi, I am newbie to perl, I hope you guys will help me resolve the challenge I am facing. I have a unix shell script on one UNIX machine say A, and a batch file on windows machine say B. Now I want...
1
by: Balajisanthanakrishnan | last post by:
Old Title: Hi all, need help for this perl script- thanks in advance I am BalajiSanthanakrishnan, chennai. Now I am working in a Perl Script which is executing in the Unix Servers. Basically i am...
0
by: nghivo | last post by:
I have a Struts application developed following the MVC method (forms, actions, beans, etc).. I have a JSP page with 2 buttons A and B. When B is clicked, a Struts action will be executed. But...
9
rajiv07
by: rajiv07 | last post by:
Hi to all, I want execute a perl program inside another perl program with passing some values to called program by calling program. Is any Idea please. Thanks in advance.
3
by: tundal45 | last post by:
Hey Guys, I am trying to automate the process of loading data in our oracle server. As a part of that process, I am working on a perl script that loads external tables from data files. What I am...
0
by: somsub | last post by:
Hi All, I am facing a problem while running a perl script through selenium RC server . I recorded oone log in test case with slenium IDE and run it after that with the ide only and it worked...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.