Running App From within ASP script not working
am 13.06.2007 14:04:26 von Allen
SO: W2003
Web server: IIS6 & ASP 3.0 (not .NET)
I use this simple script:
<%
RESPONSE.Write "
INIZIO PROCEDURA CONVERSIONE XLS..."
'CREO IL FILE EXCEL
Set objWSH = server.createObject("wscript.shell")
stringaexe = "C:\InetPub\xxxxxx\quanti\download\ConvertXLS.EXE /S
""c:\InetPub\xxxxxxxxxxx\quanti\download\prova.txt"" /T
""c:\InetPub\xxxxxxx\quanti\download\prova.xls"" C:\/C-4143 /F6 /M2
/N""^^59"""
Response.Write "
stringaexe=" & stringaexe
objWSH.Run (stringaexe)
set objWSH = Nothing
RESPONSE.Write "
IL FILE XLS E' STATO COMPLETATO!"
%>
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
Re: Running App From within ASP script not working
am 13.06.2007 17:22:50 von reb01501
Allen wrote:
> SO: W2003
> Web server: IIS6 & ASP 3.0 (not .NET)
>
> I use this simple script:
> <%
>
> RESPONSE.Write "
INIZIO PROCEDURA CONVERSIONE XLS..."
>
> 'CREO IL FILE EXCEL
>
> Set objWSH = server.createObject("wscript.shell")
>
>
> stringaexe = "C:\InetPub\xxxxxx\quanti\download\ConvertXLS.EXE /S
> ""c:\InetPub\xxxxxxxxxxx\quanti\download\prova.txt"" /T
> ""c:\InetPub\xxxxxxx\quanti\download\prova.xls"" C:\/C-4143 /F6 /M2
> /N""^^59"""
>
>
> Response.Write "
stringaexe=" & stringaexe
>
>
> objWSH.Run (stringaexe)
>
> set objWSH = Nothing
>
> RESPONSE.Write "
IL FILE XLS E' STATO COMPLETATO!"
>
> %>
>
>
>
> 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/default.aspx?scid=KB;en-us;q257 757
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.