8

webRole のデバッグに関連する問題があります。

ホストされたサービスまたは開発ファブリックで実行されていません。説明: 現在の Web 要求の実行中に未処理の例外が発生しました。エラーの詳細とコード内のどこでエラーが発生したかについては、スタック トレースを確認してください。

例外の詳細: System.InvalidOperationException: ホストされたサービスまたは開発ファブリックで実行されていません。

ソース エラー:

現在の Web 要求の実行中に未処理の例外が生成されました。例外の発生元と場所に関する情報は、以下の例外スタック トレースを使用して特定できます。

スタックトレース:

[InvalidOperationException: Not running in a hosted service or the Development Fabric.]
   Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.GetDefaultStartupInfoForCurrentRoleInstance() +169
   Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener..ctor() +57

[ConfigurationErrorsException: Could not create Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.]
   System.Web.Security.Roles.Initialize() +2230194
   System.Web.Security.RoleManagerModule.OnLeave(Object source, EventArgs eventArgs) +68
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

これは、Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener に関する web.config 部分です。

<system.diagnostics> <trace> <listeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics"> <filter type="" /> </add> </listeners> </trace> </system.diagnostics>

4

2 に答える 2

14

1 つの確認事項: クラウド プロジェクトがスタートアップ プロジェクトとして設定されていることを確認します。

于 2011-05-06T12:47:44.877 に答える
5

ほとんどの Azure 診断には、管理者権限が必要です。Windows Azure コンピューティング エミュレーターを管理者として開始していない可能性があり、それが API 呼び出しが失敗した理由です。

解決策 – 管理者として Windows Azure コンピューティング エミュレーターを起動するか、Visual Studio にエミュレーターを起動させます (Visual Studio が管理者権限で既に実行されている場合)。

于 2011-10-21T17:50:55.613 に答える