6

これは最近突然起こり始めました。Stack や他のフォーラムで見つけられるすべての解決策を試しましたが、これまでのところ何もうまくいきませんでした。

Azure ワーカー ロールでデバッグを開始しようとすると、次のようになります。

ここに画像の説明を入力

デバッグ ウィンドウには次のように表示されます。The program '[2208] WaIISHost.exe' has exited with code 0 (0x0).

正しいプロジェクトをスタートアップとして設定し、IIS Express を開発サーバーとして使用して、管理モードで Visual Studio を実行しています。

同じ基礎となるプロジェクトで新しい Azure ワーカー ロールを作成しようとしましたが、うまくいきませんでした。システム イベント ログには情報がありません。VS2015 と Azure SDK (v.2.7.1) を個別に再インストールしようとしましたが、変更はありません。コンピューティング エミュレーターを表示すると、消える前に次のように表示されます。

[fabric] Role Instance: deployment27(250).Web.0
[fabric] Role state Unhealthy
[fabric] Role state Stopped

ただし、ソリューションで他のワーカー ロール プロジェクトを開始することはできます。これにより、壊れたワーカー ロールに何らかの形で関連付けられたプロジェクトで何かが破損したに違いないと思います。この段階ではアイデアがありませんので、どんな助けも大歓迎です。

アップデート

WallSHost.log内部のファイルを見るとC:\Users\<UserAccount>\AppData\Local\dftmp\Resources\<GUID>\directory\DiagnosticStoreInvalid nameエラーが発生します。

WaIISHost Information: 0 : [00003568:00000001, 2015-10-06 20:02:05.472, INFO ] Attempt Deploy with RoleInstanceId=deployment27(252).Web_IN_0 RoleRoot=C:\Web\csx\Debug\roles\Web\ optional SitesDestination=
WaIISHost Information: 0 : [00003568:00000001, 2015-10-06 20:02:08.153, ERROR] Exception:System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Invalid name.
Parameter name: name (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ArgumentException: Invalid name.
Parameter name: name
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.DirectorySecurity..ctor(String name, AccessControlSections includeSections)
   at System.IO.DirectoryInfo.GetAccessControl(AccessControlSections includeSections)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.FileManager.AddAllowAceIterative(DirectoryInfo dir, FileSystemRights rights, IdentityReference[] accounts)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurato...).


WaIISHost Information: 0 : [00003568:00000001, 2015-10-06 20:02:08.157, ERROR] Exception:System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Invalid name.
Parameter name: name (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ArgumentException: Invalid name.
Parameter name: name
   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
   at System.Security.AccessControl.DirectorySecurity..ctor(String name, AccessControlSections includeSections)
   at System.IO.DirectoryInfo.GetAccessControl(AccessControlSections includeSections)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurator.FileManager.AddAllowAceIterative(DirectoryInfo dir, FileSystemRights rights, IdentityReference[] accounts)
   at Microsoft.WindowsAzure.ServiceRuntime.IISConfigurato...).
4

1 に答える 1

13

Visual Studios、Azure SDK、IIS を再インストールし、ログ ファイルを調べた結果、ようやく問題が見つかりましたnode_modules。自分のワーカー ロールに関連付けられている Web プロジェクト内のフォルダーです。

フォルダーを削除するとすぐに、デバッグがすぐに開始されました。Visual Studio ソリューションの一部ではありませんが。

それ以来、スタックでこの特定の問題を検索し、この投稿を見つけました: https://stackoverflow.com/a/28188299/654708

rmdir /s /q "$(ProjectDir)node_modules\"worker ロールに関連付けられたプロジェクトのプロパティ内のビルド後のイベントに追加するnode_modulesと、Azure デバッガーが開始する前にフォルダーが削除されます。完全な修正ではありませんが、Windows が長いファイル名を処理できないというばかげた問題が修正されるまでは、問題はありません。

ここに画像の説明を入力

アップデート

より良い解決策を見つけました。次の Microsoft 開発チームnpmのモジュールを使用して、>= 3.x に更新します。npm-windows-upgrade

https://www.npmjs.com/package/npm-windows-upgrade

npm3.x では、フォルダー内のモジュールはフラットnode_modulesな構造で格納されます。これにより、Azure デバッガーがクラッシュする原因となるパスの 256 文字制限を回避できます (ソリューション ルートへのパスがまだ長すぎない場合)。

Node を Windows にインストールする場合、デフォルトでnpmバージョン 2 がバンドルされています (2015 年 9 月 8 日現在)。通常のnpmupdate コマンドを使用してnpm -g install npm@<version>も、Node は常にnpmインストールに付属の のバージョンを参照するため、機能しません。それが入ってnpm-windows-upgradeくるところです。

管理者権限で Windows PowerShell を開き、次のタスクを実行して、npmインストールする のバージョンを選択します。

  1. Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
  2. npm install -g npm-windows-upgrade
  3. npm-windows-upgrade

ここに画像の説明を入力

追加資料:

https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows https://github.com/npm/npm/issues/3697#issuecomment-114665926

于 2015-10-06T22:37:39.470 に答える