Question

après avoir cliqué sur sur le bouton en application asp.net Process.Start () court outil edmgen avec des arguments. Et je surprends erreur: text alt

var cs =ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;

    string myArgs="/mode:fullgeneration /c:\""+cs+"\"  /project:nwd /entitycontainer:SchoolEntities /namespace:SchoolModel /language:CSharp ";
    string filename= GetFrameworkDirectory() + "\\EdmGen.exe";

    ProcessStartInfo startInfo = new ProcessStartInfo(filename,myArgs);
    startInfo.UseShellExecute = false;

    //startInfo.RedirectStandardError = true;
    Process myGenProcess = Process.Start(startInfo);

    //genInfo.Text = myGenProcess.StandardError.ReadToEnd();

Comment résoudre ce problème?

Était-ce utile?

La solution

Vous devez passer le chemin complet vers un dossier que vous avez accès en écriture à la sortie.

Autres conseils

Eh bien l'erreur indique que vous n'avez pas accès à "C: \ Program Files \ Common Files \ Microsoft Shared \ devserver \ 10.0 \ nwd.ssdl".

Vérifiez que votre processus a les autorisations nécessaires sur le fichier et tous les dossiers dans l'arborescence.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top