For Programmers: Free Programming Magazines  


Home > Archive > ASP > June 2007 > Running App From within ASP script not working









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Running App From within ASP script not working
Allen

2007-06-13, 6:57 pm

SO: W2003
Web server: IIS6 & ASP 3.0 (not .NET)

I use this simple script:
<%

RESPONSE.Write "<BR>INIZIO PROCEDURA CONVERSIONE XLS..."

'CREO IL FILE EXCEL

Set objWSH = server.createObject("wscript.shell")


stringaexe = " C:\InetPub\xxxxxx\quanti\download\Conver
tXLS.EXE /S
"" c:\InetPub\xxxxxxxxxxx\quanti\download\p
rova.txt"" /T
"" c:\InetPub\xxxxxxx\quanti\download\prova
.xls"" C:\/C-4143 /F6 /M2
/N""^^59"""


Response.Write "<BR>stringaexe=" & stringaexe


objWSH.Run (stringaexe)

set objWSH = Nothing

RESPONSE.Write "<BR><B>IL FILE XLS E' STATO COMPLETATO!</B>"

%>



The same thing works when using the command line, or batch file, but not
within my ASP script. It appears to launch ConvertXLS.EXE, as it is in the
task manager, however, it seems to hang.

Please tell me, what things do I need to look at to resolve this issue?

Thank you for your attention.

Allen


Bob Barrows [MVP]

2007-06-13, 6:57 pm

Allen wrote:
> SO: W2003
> Web server: IIS6 & ASP 3.0 (not .NET)
>
> I use this simple script:
> <%
>
> RESPONSE.Write "<BR>INIZIO PROCEDURA CONVERSIONE XLS..."
>
> 'CREO IL FILE EXCEL
>
> Set objWSH = server.createObject("wscript.shell")
>
>
> stringaexe = " C:\InetPub\xxxxxx\quanti\download\Conver
tXLS.EXE /S
> "" c:\InetPub\xxxxxxxxxxx\quanti\download\p
rova.txt"" /T
> "" c:\InetPub\xxxxxxx\quanti\download\prova
.xls"" C:\/C-4143 /F6 /M2
> /N""^^59"""
>
>
> Response.Write "<BR>stringaexe=" & stringaexe
>
>
> objWSH.Run (stringaexe)
>
> set objWSH = Nothing
>
> RESPONSE.Write "<BR><B>IL FILE XLS E' STATO COMPLETATO!</B>"
>
> %>
>
>
>
> The same thing works when using the command line, or batch file, but
> not within my ASP script. It appears to launch ConvertXLS.EXE, as it
> is in the task manager, however, it seems to hang.
>
> Please tell me, what things do I need to look at to resolve this
> issue?
>

Probably, stop trying to do it. If this application requires user input,
then trying to run it on the server is doomed to fail.

If the application does not require user input, then you are likely
encountering a permissions issue. IIS processes do not run under your
user account. Unless your website has Anonymous disabled, the account
used is the IUSR_machinename account, so you need to grant that account
whatever permissions are required to run your application.

See here for better ways to create Excel files in ASP:
http://support.microsoft.com/defaul...B;en-us;q257757

There is also a product sold by ASPOSE that handles Excel files.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com