У меня есть веб-приложение ASP.Net, которое пытается войти в Azure с помощью команд Power Shell. Для этой цели используется следующий код:
Runspace runspace = RunspaceFactory.CreateRunspace();
runspace.Open();
Pipeline pipeline = runspace.CreatePipeline();
pipeline.Commands.AddScript("az login -u 'vtripathi@hsdyn.com' -p '********'");
pipeline.Commands.Add("Out-String");
var output = pipeline.Invoke();
string result = output[0].ToString();
Проблема здесь заключается в том, что когда я запускаю это приложение локально в моей системе, ему удается успешно войти в Azure, но при развертывании этого приложения в службе приложений Azure я получаю следующую ошибку:
Server Error in '/' Application.
The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Пожалуйста, подскажите, что может быть не так.