ApplicationInsights>TelemetryChannel>StorageFolder 中的更改不反映

Change in ApplicationInsights>TelemetryChannel>StorageFolder does not reflects

我在 Windows Server 2016 上的默认存储文件夹有权限问题,我在 TRACE 上不断收到以下错误:

AI (Internal): [Microsoft-ApplicationInsights-WindowsServer-TelemetryChannel] Unauthorized access dequeuing file, folder not accessible: 5dd29ef58369a24b5a015ae5d7a400adffee3c3f379057066bda9dd1ad8a4771. Exception: System.UnauthorizedAccessException: Access to the path 'C:\Windows\TEMP\Microsoft\ApplicationInsightsdd29ef58369a24b5a015ae5d7a400adffee3c3f379057066bda9dd1ad8a4771' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
   at Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.PlatformFolder.GetFiles() in E:\A\_work\s\BASE\src\ServerTelemetryChannel\Implementation\PlatformFolder.cs:line 46
   at Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.TransmissionStorage.GetTransmissionFiles() in E:\A\_work\s\BASE\src\ServerTelemetryChannel\Implementation\TransmissionStorage.cs:line 257
   at Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.TransmissionStorage.LoadFilesOrderedByDateFromFolder() in E:\A\_work\s\BASE\src\ServerTelemetryChannel\Implementation\TransmissionStorage.cs:line 284
   at Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.TransmissionStorage.GetOldestTransmissionFileOrNull() in E:\A\_work\s\BASE\src\ServerTelemetryChannel\Implementation\TransmissionStorage.cs:line 268
   at Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.TransmissionStorage.Dequeue() in E:\A\_work\s\BASE\src\ServerTelemetryChannel\Implementation\TransmissionStorage.cs:line 134.

我已尝试通过参考 to documentation here 将以下更改添加到 ApplicationInsights.config :

<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel">
                <StorageFolder>D:\ApplicationInsights\My.App.API\Prod</StorageFolder>
</TelemetryChannel>

但这没有任何效果。我在这里做错了什么?

这是我创建的自定义文件夹的权限问题。我在 GitHub

上报告了一个问题后才意识到这一点