Richiamare file eseguibili da codice asp.net

martedì 19 ottobre 2004 - 15.56

l.corallini Profilo | Junior Member

ciao a tutti,

ho l'esigenza di lanciare un file .exe ,residente sul server , da applicazione? si può fare? se sì come?
grazie

luca

l.corallini Profilo | Junior Member

Ho provato ad utilizzare questo codice:

----------------------------------------------------------------------------------------------------------
Public Function RichiamaExe(ByVal Percorso As String)
Dim myProcess As New Process
***Percorso= "e:\TS_Appl\TS_RotazioneMateriale\TS_RotazioneMaterialeExcel_Web.exe 20/10/2004;20/10/2004;;0;100;l.corallini@tsf.it"***

Try
' Get the path that stores user documents.
Dim myDocumentsPath As String = Percorso
myProcess.StartInfo.FileName = myDocumentsPath
'myProcess.StartInfo.Verb = "Print"
'myProcess.StartInfo.CreateNoWindow = True
myProcess.Start()
Catch e As Win32Exception
If e.NativeErrorCode = ERROR_FILE_NOT_FOUND Then
Console.WriteLine((e.Message + ". Check the path."))

Else
If e.NativeErrorCode = ERROR_ACCESS_DENIED Then
' Note that if your word processor might generate exceptions
' such as this, which are handled first.
Console.WriteLine((e.Message + ". You do not have permission to print this file."))
End If
End If
End Try
End Function
---------------------------------------------------------------------------------------------------------

Non mi funziona, ma mi sono dimenticato di chiedere se si può richiamare l'EXE che sta su una macchina differente dal web server...Se si può quale parametro devo impostare?

grazie

luca

l.corallini Profilo | Junior Member

ho capito...

quindi se utilizzando il DB SQL Server potevo richiamare una stored procedure che attraverso il comando DOS 'xp_cmdshell' lanciava l'eseguibile, adesso che siamo migrati ad ORACLE come posso fare?
pensavo che si potesse chiamare un exe residente sul server con asp.net...

grazie comunque
ciao

luca
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5