473,748 Members | 4,697 Online
Bytes | Software Development & Data Engineering Community
+ 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:\\Inet pub\\wwwroot\\B asicDataRequest s\\Robot.pl",
AppWinStyle.Nor malNoFocus, 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\\ww wroot\\BasicDat aRequests\\Robo t.pl",
AppWinStyle.Nor malNoFocus, 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 4981
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***@discussi ons.microsoft.c om> wrote in message
news:57******** *************** ***********@mic rosoft.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:\\Inet pub\\wwwroot\\B asicDataRequest s\\Robot.pl",
AppWinStyle.Nor malNoFocus, 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\\ww wroot\\BasicDat aRequests\\Robo t.pl",
AppWinStyle.Nor malNoFocus, 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*******@simu lplex.net> wrote in message
news:OH******** ********@TK2MSF TNGP09.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***@discussi ons.microsoft.c om> wrote in message
news:57******** *************** ***********@mic rosoft.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:\\Inet pub\\wwwroot\\B asicDataRequest s\\Robot.pl",
AppWinStyle.Nor malNoFocus, 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\\ww wroot\\BasicDat aRequests\\Robo t.pl",
AppWinStyle.Nor malNoFocus, 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******** ******@TK2MSFTN GP09.phx.gbl...
How about trying Process.Start() . ?

http://cheeso.members.winisp.net/src...e=shellex.aspx
"Klaus H. Probst" <us*******@simu lplex.net> wrote in message
news:OH******** ********@TK2MSF TNGP09.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***@discussi ons.microsoft.c om> wrote in message
news:57******** *************** ***********@mic rosoft.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:\\Inet pub\\wwwroot\\B asicDataRequest s\\Robot.pl",
AppWinStyle.Nor malNoFocus, 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\\ww wroot\\BasicDat aRequests\\Robo t.pl",
AppWinStyle.Nor malNoFocus, 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
1840
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 #!/bin/perl -w ...... ...... $cmd = "import mypkg; do this; do that"; $string = `python -c \"$cmd\"`;
3
396
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 to use the 'Shell()'-command . 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...
1
1778
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
6997
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 to write a perl script on windows box which can trigger both, the batch file on B and the script on A Would you please help me...
1
1637
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 Oracle plsql programmer, but i need to work nowadays in Perl also. In my perl script, there are some entries like $oid_to_get='1.3.6.1.2.1.4.22.1.2'; $comm = bones; $comm2 = public; $port = 161; $done{$router} = "skip";
0
1606
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 when A is clicked, I want to execute a script (ksh or Perl) on the server and get the response back to my form thru the use of (Javascript AJAX) Http Request object (hence, w/o refreshing my JSP page). So far so good except that instead of...
9
19988
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
4047
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 seeing is that I get following error when I select from external table created using script. ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-00554: error encountered while parsing access parameters...
0
2072
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 fine . After I exported that test case as a perl script . I installed all the required modules (like Test::WWW::Selenium,Test::More,Test::Exception)by PPM GUI (As I am using active perl 5.10 on winxp).I run the Selenium Rc server and tried to...
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9363
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...
1
6793
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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
4593
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
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
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
2775
muto222
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.