0

Azure powershell script files(PS1) are not working after hosting in IIS. We invoke PS1 files from C#(using Runspace and pipeline). The PS1 files are working fine if I debug through powershell ISE.But following logs found after hosting in IIS.

yet to invoke pipe line

Invoked pipe line

result count is : 0

An internal error occurred.

An error occurred while sending the request.

However,when the APIs are debugged,the pipeline does not throw any error. Is there any environment issue such as publishsettings file? How to resolve this kind of exceptions?

4

1 に答える 1

0

問題は、コマンドが IIS で実行されているユーザーにあると思います。コマンドレットは、ユーザーの appdata ディレクトリにサブスクリプション データベースを作成して読み取ります。w3wp プロセス用に構成されたユーザーには、そのようなディレクトリがないと推測されます。

一連のインポートされたサブスクリプションを持つユーザーとして iis アプリ プールを実行するか、スクリプトの一部としてサブスクリプションをインポートしてみてください。

于 2013-11-14T02:27:47.217 に答える