Bonjour à tous,

J'ai un petit problème pour exécuter une application console à partir d'une web-méthode.
Cet exe, à terme, va générer des fichiers très spécifique faisant appel à diverses dlls.

Pour le moment l'exe est limité à ça plus simple expression:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
[STAThread]
static void Main(string[] args) 
{
      Thread.Sleep(10000);
}
J'essaie de lancer l'exe avec Process.Start()
L'exe se lance bien avec :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
ProcessStartInfo _iStartInfo = new ProcessStartInfo();
_iStartInfo.FileName = _iGeneratorExePath;
_iStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
_iStartInfo.Arguments = _pParamExe;
 
Process _iProcess = Process.Start(_iStartInfo);
Mais la génération ne fonctionne pas à cause de droit spécifique (une dll ne se charge pas)

L'exe ne se lance pas avec ces différentes méthodes:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
ProcessStartInfo _iStartInfo = new ProcessStartInfo();
_iStartInfo.FileName = _iGeneratorExePath;
_iStartInfo.WorkingDirectory = System.Web.HttpContext.Current.Request.PhysicalApplicationPath;
_iStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
_iStartInfo.Password = _iPassword;
_iStartInfo.UserName = @"********";
_iStartInfo.Domain = @"*******";
_iStartInfo.Arguments = _pParamExe;
_iStartInfo.Verb = "runas";
_iStartInfo.UseShellExecute = false;
_iStartInfo.RedirectStandardError = true;
 
Process _iProcess = Process.Start(_iStartInfo);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
ProcessStartInfo _iStartInfo = new ProcessStartInfo();
_iStartInfo.FileName = _iGeneratorExePath;
_iStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
_iStartInfo.Arguments = _pParamExe;
_iStartInfo.Verb = "runas";
 
Process _iProcess = Process.Start(_iStartInfo);
j'ai essayé plein de chose, j'ai ajouté les droits au dossier pour le pool du webservice, j'ai lu ce ticket :http://www.developpez.net/forums/d97...on-webservice/

mais les réponse ne m'ont pas apporté beaucoup plus.

Du coup je suis bloqué et je ne sais plus quoi faire.

avez-vous des idées ?
Avez-vous des questions ?

PS: en mode débug dans VS2010 aucun problème d'exécution.