|
 |
asp_web_howto thread: Executing VBScript from ASP
Message #1 by "O. Mortensen" <orla-67@i...> on Tue, 16 Jul 2002 11:33:08
|
|
Hi
As a client/browser, I want to call page2.asp, which has 2 functions:
1) Execute page3 VBS or ASP (Updating Oracle DB, generating PDF etc.)
2) Redirect to page4.asp
Executing page3 takes a while, so I don't want the client to wait
for completion. It has no screen output to the client, so it could
be run at my webserver (WIN2000/IIS5)
What is the best solution in this case ?
Is this approach in page2.asp possible, and is there any security breach ?
<%
set wshell = Server.createobject("wscript.shell")
wshell.Run "c:\winnt\system32\cscript.exe
D:\Application\Inetpub\wwwroot\cgi-bin\page3.vbs"
set wshell = nothing
%>
As a client, the script is executed as IUSR_MACHINENAME, which I am not
sure is allowed on the server.
I hope someone can help me with these questions
Thanks
Orla
Denmark
Message #2 by "TomMallard" <mallard@s...> on Tue, 16 Jul 2002 06:58:36 -0700
|
|
Hmmm, using an MTS package with MSMQ will allow asynchronous processing on
the long query without losing the thread. Most of this type of situation is
called from a frames page so the client is always connected while waiting
for one page to finish. When it does, it can then redirect and show the new
page in the frames.
tom mallard
seattle
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Tuesday, July 16, 2002 11:33 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Executing VBScript from ASP
Hi
As a client/browser, I want to call page2.asp, which has 2 functions:
1) Execute page3 VBS or ASP (Updating Oracle DB, generating PDF etc.)
2) Redirect to page4.asp
Executing page3 takes a while, so I don't want the client to wait
for completion. It has no screen output to the client, so it could
be run at my webserver (WIN2000/IIS5)
What is the best solution in this case ?
Is this approach in page2.asp possible, and is there any security breach ?
<%
set wshell = Server.createobject("wscript.shell")
wshell.Run "c:\winnt\system32\cscript.exe
D:\Application\Inetpub\wwwroot\cgi-bin\page3.vbs"
set wshell = nothing
%>
As a client, the script is executed as IUSR_MACHINENAME, which I am not
sure is allowed on the server.
I hope someone can help me with these questions
Thanks
Orla
Denmark
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by "O. Mortensen" <orla-67@i...> on Wed, 17 Jul 2002 14:26:14
|
|
Thanks Tom
Page3 makes a 10 pages PDF document, without the customers knowledge.
So I want to "bypass" page3 and go straight to page4.asp (redirect).
Page4.asp is the last page in the proccess, so I guess the customer closes
the browser when page4 is received.
When I fire CSCRIPT..... in a CMD on my server, as Administrator, it runs
just fine.
When I call page2.asp as a client, it seems like, I am not authorized to
do so.
Can anyone confirm it's a problem, and maybe come up with an alternative.
Thanks
Orla
> Hmmm, using an MTS package with MSMQ will allow asynchronous processing
on
the long query without losing the thread. Most of this type of situation is
called from a frames page so the client is always connected while waiting
for one page to finish. When it does, it can then redirect and show the new
page in the frames.
tom mallard
seattle
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Tuesday, July 16, 2002 11:33 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Executing VBScript from ASP
Hi
As a client/browser, I want to call page2.asp, which has 2 functions:
1) Execute page3 VBS or ASP (Updating Oracle DB, generating PDF etc.)
2) Redirect to page4.asp
Executing page3 takes a while, so I don't want the client to wait
for completion. It has no screen output to the client, so it could
be run at my webserver (WIN2000/IIS5)
What is the best solution in this case ?
Is this approach in page2.asp possible, and is there any security breach ?
<%
set wshell = Server.createobject("wscript.shell")
wshell.Run "c:\winnt\system32\cscript.exe
D:\Application\Inetpub\wwwroot\cgi-bin\page3.vbs"
set wshell = nothing
%>
As a client, the script is executed as IUSR_MACHINENAME, which I am not
sure is allowed on the server.
I hope someone can help me with these questions
Thanks
Orla
Denmark
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #4 by "TomMallard" <mallard@s...> on Wed, 17 Jul 2002 06:37:36 -0700
|
|
Check that the machine has permissions for "script" under web sharing for
the folder where the script resides. For win2k use IUSR_TEMPLATE for the
machine name.
I think you just need a function which launches the pdf process that returns
a boolean letting you know it's started that's called from page4.asp. If
this returns true, the rest of page4 gets executed, if not, you need an
error handler for the pdf not working.
tom
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Wednesday, July 17, 2002 2:26 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Executing VBScript from ASP
Thanks Tom
Page3 makes a 10 pages PDF document, without the customers knowledge.
So I want to "bypass" page3 and go straight to page4.asp (redirect).
Page4.asp is the last page in the proccess, so I guess the customer closes
the browser when page4 is received.
When I fire CSCRIPT..... in a CMD on my server, as Administrator, it runs
just fine.
When I call page2.asp as a client, it seems like, I am not authorized to
do so.
Can anyone confirm it's a problem, and maybe come up with an alternative.
Thanks
Orla
> Hmmm, using an MTS package with MSMQ will allow asynchronous processing
on
the long query without losing the thread. Most of this type of situation is
called from a frames page so the client is always connected while waiting
for one page to finish. When it does, it can then redirect and show the new
page in the frames.
tom mallard
seattle
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Tuesday, July 16, 2002 11:33 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Executing VBScript from ASP
Hi
As a client/browser, I want to call page2.asp, which has 2 functions:
1) Execute page3 VBS or ASP (Updating Oracle DB, generating PDF etc.)
2) Redirect to page4.asp
Executing page3 takes a while, so I don't want the client to wait
for completion. It has no screen output to the client, so it could
be run at my webserver (WIN2000/IIS5)
What is the best solution in this case ?
Is this approach in page2.asp possible, and is there any security breach ?
<%
set wshell = Server.createobject("wscript.shell")
wshell.Run "c:\winnt\system32\cscript.exe
D:\Application\Inetpub\wwwroot\cgi-bin\page3.vbs"
set wshell = nothing
%>
As a client, the script is executed as IUSR_MACHINENAME, which I am not
sure is allowed on the server.
I hope someone can help me with these questions
Thanks
Orla
Denmark
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #5 by "O. Mortensen" <orla-67@i...> on Thu, 18 Jul 2002 12:06:39
|
|
Page3.vbs resides in cgi-bin, where Everyone has execute permission. In the
same lib, customers execute .EXE files with out problems.
I generate the PDF document (later on 2 og 3 documents), and e-mails the
document, and other documents as attatchments. It works perfect on the
server.
On page4.asp I don't need to get a status from the PDF process.
How do you launch the PDF process ?
Regards
Orla
> Check that the machine has permissions for "script" under web sharing for
the folder where the script resides. For win2k use IUSR_TEMPLATE for the
machine name.
I think you just need a function which launches the pdf process that
returns
a boolean letting you know it's started that's called from page4.asp. If
this returns true, the rest of page4 gets executed, if not, you need an
error handler for the pdf not working.
tom
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Wednesday, July 17, 2002 2:26 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Executing VBScript from ASP
Thanks Tom
Page3 makes a 10 pages PDF document, without the customers knowledge.
So I want to "bypass" page3 and go straight to page4.asp (redirect).
Page4.asp is the last page in the proccess, so I guess the customer closes
the browser when page4 is received.
When I fire CSCRIPT..... in a CMD on my server, as Administrator, it runs
just fine.
When I call page2.asp as a client, it seems like, I am not authorized to
do so.
Can anyone confirm it's a problem, and maybe come up with an alternative.
Thanks
Orla
> Hmmm, using an MTS package with MSMQ will allow asynchronous processing
on
the long query without losing the thread. Most of this type of situation is
called from a frames page so the client is always connected while waiting
for one page to finish. When it does, it can then redirect and show the new
page in the frames.
tom mallard
seattle
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Tuesday, July 16, 2002 11:33 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Executing VBScript from ASP
Hi
As a client/browser, I want to call page2.asp, which has 2 functions:
1) Execute page3 VBS or ASP (Updating Oracle DB, generating PDF etc.)
2) Redirect to page4.asp
Executing page3 takes a while, so I don't want the client to wait
for completion. It has no screen output to the client, so it could
be run at my webserver (WIN2000/IIS5)
What is the best solution in this case ?
Is this approach in page2.asp possible, and is there any security breach ?
<%
set wshell = Server.createobject("wscript.shell")
wshell.Run "c:\winnt\system32\cscript.exe
D:\Application\Inetpub\wwwroot\cgi-bin\page3.vbs"
set wshell = nothing
%>
As a client, the script is executed as IUSR_MACHINENAME, which I am not
sure is allowed on the server.
I hope someone can help me with these questions
Thanks
Orla
Denmark
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #6 by "TomMallard" <mallard@s...> on Thu, 18 Jul 2002 07:22:35 -0700
|
|
Hmmm, "Everyone" doesn't include machines only users, for asp to call the
*.exe, the folder needs the machine to have explicit script permissions to
it.
Creating pdf's is usually adobe software, although there are some components
that can output pdf's. To launch it, you can use a cscript/wscript...
tom
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Thursday, July 18, 2002 12:07 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Executing VBScript from ASP
Page3.vbs resides in cgi-bin, where Everyone has execute permission. In the
same lib, customers execute .EXE files with out problems.
I generate the PDF document (later on 2 og 3 documents), and e-mails the
document, and other documents as attatchments. It works perfect on the
server.
On page4.asp I don't need to get a status from the PDF process.
How do you launch the PDF process ?
Regards
Orla
> Check that the machine has permissions for "script" under web sharing for
the folder where the script resides. For win2k use IUSR_TEMPLATE for the
machine name.
I think you just need a function which launches the pdf process that
returns
a boolean letting you know it's started that's called from page4.asp. If
this returns true, the rest of page4 gets executed, if not, you need an
error handler for the pdf not working.
tom
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Wednesday, July 17, 2002 2:26 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Executing VBScript from ASP
Thanks Tom
Page3 makes a 10 pages PDF document, without the customers knowledge.
So I want to "bypass" page3 and go straight to page4.asp (redirect).
Page4.asp is the last page in the proccess, so I guess the customer closes
the browser when page4 is received.
When I fire CSCRIPT..... in a CMD on my server, as Administrator, it runs
just fine.
When I call page2.asp as a client, it seems like, I am not authorized to
do so.
Can anyone confirm it's a problem, and maybe come up with an alternative.
Thanks
Orla
> Hmmm, using an MTS package with MSMQ will allow asynchronous processing
on
the long query without losing the thread. Most of this type of situation is
called from a frames page so the client is always connected while waiting
for one page to finish. When it does, it can then redirect and show the new
page in the frames.
tom mallard
seattle
-----Original Message-----
From: O. Mortensen [mailto:orla-67@i...]
Sent: Tuesday, July 16, 2002 11:33 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Executing VBScript from ASP
Hi
As a client/browser, I want to call page2.asp, which has 2 functions:
1) Execute page3 VBS or ASP (Updating Oracle DB, generating PDF etc.)
2) Redirect to page4.asp
Executing page3 takes a while, so I don't want the client to wait
for completion. It has no screen output to the client, so it could
be run at my webserver (WIN2000/IIS5)
What is the best solution in this case ?
Is this approach in page2.asp possible, and is there any security breach ?
<%
set wshell = Server.createobject("wscript.shell")
wshell.Run "c:\winnt\system32\cscript.exe
D:\Application\Inetpub\wwwroot\cgi-bin\page3.vbs"
set wshell = nothing
%>
As a client, the script is executed as IUSR_MACHINENAME, which I am not
sure is allowed on the server.
I hope someone can help me with these questions
Thanks
Orla
Denmark
-
|
|
 |