2

わかりました、私はしばらくの間これに頭をぶつけていました.誰かがこれに遭遇したことがあるかどうか尋ねます.

私の構成とセットアップは以下のとおりです。これは、ステージング環境にデプロイされた場合です。RDP を有効にしているため、ログが記録されていることがわかります。ログインでき、作成された IIS ログを確認できます。ただし、他の診断ログでは問題なく転送されますが、それらは BLOB ストレージに転送されません。

インフラストラクチャ ログには、次のエラーが表示されます。これは、プロキシに関するものであり、関連性がないと言われています。

WinHttpGetProxyForUrl(http://mystorage.blob.core.windows.net) failed ERROR_WINHTTP_AUTODETECTION_FAILED (12180)

イベント ビューアーに表示されるその他の警告は次のとおりです。

-<Event>
-<System>
 <Provider Name="Microsoft-Windows-IIS-W3SVC-WP"Guid="{670080D9-742A-4187-8D16-41143D1290BD}"EventSourceName="W3SVC-WP"/>
 <EventID Qualifiers="32768">2283</EventID>
 <Version>0</Version>
 <Level>3</Level>
 <Task>0</Task>
 <Opcode>0</Opcode>
 <Keywords>0x80000000000000</Keywords>
 <TimeCreated SystemTime="2011-02-18T22:46:34.000Z"/>
 <EventRecordID>266</EventRecordID>
 <Correlation/>
 <Execution ProcessID="0"ThreadID="0"/>
 <Channel>Application</Channel>
 <Computer>RD00155D3273B5</Computer>
 <Security/>
 </System>
-<EventData>
 <Data Name="FailureCount">3</Data>
 <Data Name="Minutes">5</Data>
 <Data Name="Directory">\\?\C:\Resources\directory\345345kjh325kj5432452345.MyWebRole.DiagnosticStore\FailedReqLogFiles\Web\W3SVC1273337584\</Data>
 <Binary>03000780</Binary>
 </EventData>
 </Event>

これは、WebRole として実行される非常に単純な WCF アプリケーションです。構成は次のようになります。

<system.diagnostics>
            <sources>
                <source name="System.ServiceModel" switchValue="Information,ActivityTracing" propagateActivity="false">
                    <listeners>
                        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="ModelListener">
                            <filter type="" />
                        </add>
                    </listeners>
                </source>
                <source name="System.ServiceModel.MessageLogging" switchValue="Information" propagateActivity="false">
                    <listeners>
                        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="MessageListener">
                            <filter type="" />
                        </add>
                    </listeners>
                </source>
            </sources>
            <sharedListeners>               
            </sharedListeners>
            <trace autoflush="true" indentsize="3">
                <listeners>
                    <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="TraceListener">
                        <filter type="" />
                    </add>
                </listeners>
            </trace>            
        </system.diagnostics>
...
...
<system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
        <tracing>
            <traceFailedRequests>

                <add path="*">
                    <traceAreas>
                        <add provider="ASP" verbosity="Verbose" />
                        <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
                        <add provider="ISAPI Extension" verbosity="Verbose" />
                        <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module" verbosity="Verbose" />
                    </traceAreas>
                    <failureDefinitions verbosity="Warning" statusCodes="400-599" />
                </add>
            </traceFailedRequests>
        </tracing>
    </system.webServer>

また、リスナーをいくつか異なる方法で変更しましたが、結果は同じでした。だから私はそれが問題だとは思わないが、私は提案を受け入れる

webrole のコードは次のようになります。

public override bool OnStart ()
        {

            // To enable the AzureLocalStorageTraceListner, uncomment relevent section in the web.config  
            DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration();
            //Windows Performance Counters

            List<string> counters = new List<string>();
            counters.Add(@"\Processor(_Total)\% Processor Time");
            counters.Add(@"\Memory\Available Mbytes");
            counters.Add(@"\TCPv4\Connections Established");
            counters.Add(@"\ASP.NET Applications(__Total__)\Requests/Sec");
            counters.Add(@"\Network Interface(*)\Bytes Received/sec");
            counters.Add(@"\Network Interface(*)\Bytes Sent/sec");

            foreach (string counter in counters)
            {
                PerformanceCounterConfiguration counterConfig = new PerformanceCounterConfiguration();
                counterConfig.SampleRate = TimeSpan.FromMinutes(1);
                counterConfig.CounterSpecifier = counter;
                config.PerformanceCounters.DataSources.Add(counterConfig);
            }

            config.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);

            //Windows Event Logs
            config.WindowsEventLog.DataSources.Add("System!*");
            config.WindowsEventLog.DataSources.Add("Application!*");
            config.WindowsEventLog.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
            config.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Error;

            //Azure Trace Logs
            config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
            config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Error;

            //Crash Dumps
            CrashDumps.EnableCollection(true);

            //IIS Logs
            //This was added in a desperation move but it has not made a difference with or without
            DirectoryConfiguration directory = new DirectoryConfiguration();
            directory.Container = "wad-tracefiles";
            directory.DirectoryQuotaInMB = 10;
            directory.Path = RoleEnvironment.GetLocalResource("AppLocalStorage.svclog").RootPath; 

            config.Directories.DataSources.Add(directory);
            //end desperation move
            config.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);

            //infrastructure logs
            config.DiagnosticInfrastructureLogs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
            config.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Error;

            DiagnosticMonitor.Start("DiagnosticsConnectionString", config);

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
            RoleEnvironment.Changing += new EventHandler<RoleEnvironmentChangingEventArgs>(RoleEnvironment_Changing);

            // This code is necessary to use CloudStorageAccount.FromConfigurationSetting
            CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
            {
                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));
                RoleEnvironment.Changed += (sender, arg) =>
                {
                    if (arg.Changes.OfType<RoleEnvironmentConfigurationSettingChange>()
                        .Any((change) => (change.ConfigurationSettingName == configName)))
                    {
                        if (!configSetter(RoleEnvironment.GetConfigurationSettingValue(configName)))
                        {
                            RoleEnvironment.RequestRecycle();
                        }
                    }
                };
            });


            return base.OnStart();

        }

一部のDiagnosticsConnectionStringテーブルとコンテナが適切に作成され、適切に設定されているため、 は適切に設定されています。

どんな助けでも大歓迎です。前もって感謝します。

4

2 に答える 2

3

これは、SDK 1.3 を使用する Azure の既知の問題です。回避策については、次のブログ投稿を参照してください: http://robindotnet.wordpress.com/2011/02/16/azure-toolssdk-1-3-and-iis-logging/

于 2011-02-19T13:33:07.917 に答える
1

これはAzureSDK1.4で修正されています

WindowsAzureの新機能から:

診断でIISログをWindowsAzureストレージに転送できなくなるIISログファイルのアクセス許可の問題を解決しました。

于 2011-03-09T23:20:38.383 に答える