Skip to content

Commit af456af

Browse files
fixed package version issues and added better logging to detect package binding redirect issues
1 parent a097189 commit af456af

File tree

11 files changed

+125
-98
lines changed

11 files changed

+125
-98
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ csharp_indent_labels = one_less_than_current
3030
csharp_style_expression_bodied_local_functions = false:silent
3131
csharp_indent_braces = false
3232
csharp_space_around_binary_operators = before_and_after
33-
csharp_space_between_method_declaration_name_and_open_parenthesis = true
33+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
3434

3535
[*.{cs,vb}]
3636
#### Naming styles ####

Aikido.Zen.Core/Agent.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Concurrent;
33
using System.Collections.Generic;
4+
using System.Diagnostics;
45
using System.Runtime.CompilerServices;
56
using System.Text.RegularExpressions;
67
using System.Threading;
@@ -496,10 +497,13 @@ private async Task<int> ProcessSingleEvent(QueuedItem queuedItem, int requestsTh
496497
_eventQueue.Enqueue(queuedItem);
497498
throw;
498499
}
499-
catch (Exception)
500+
catch (Exception ex)
500501
{
501502
// Requeue on error and delay
502503
_eventQueue.Enqueue(queuedItem);
504+
LogHelper.DebugLog(Logger, $"AIKIDO: Error processing event: {queuedItem.Event.Type}, Error: {ex.Message}");
505+
Trace.WriteLine($"AIKIDO: Error processing event: {queuedItem.Event.Type}, Error: {ex.Message}");
506+
Console.WriteLine($"AIKIDO: Error processing event: {queuedItem.Event.Type}, Error: {ex.Message}");
503507
await Task.Delay(RetryDelayMs, _cancellationSource.Token);
504508
}
505509
return requestsThisSecond;

Aikido.Zen.DotNetFramework/Aikido.Zen.DotNetFramework.csproj

Lines changed: 17 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,14 @@
7070
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
7171
<HintPath>..\sample-apps\packages\Microsoft.AspNetCore.Http.Features.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath>
7272
</Reference>
73-
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
74-
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.2\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
73+
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
74+
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
7575
</Reference>
76-
<Reference Include="Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5, processorArchitecture=MSIL">
77-
<HintPath>..\packages\Microsoft.Data.SqlClient.5.2.2\lib\net462\Microsoft.Data.SqlClient.dll</HintPath>
76+
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
77+
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.6.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
7878
</Reference>
79-
<Reference Include="Microsoft.Data.Sqlite, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
80-
<HintPath>..\packages\Microsoft.Data.Sqlite.Core.9.0.0\lib\netstandard2.0\Microsoft.Data.Sqlite.dll</HintPath>
81-
</Reference>
82-
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=9.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
83-
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
84-
</Reference>
85-
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
86-
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.9.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
79+
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
80+
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
8781
</Reference>
8882
<Reference Include="Microsoft.Extensions.Primitives, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
8983
<HintPath>..\sample-apps\packages\Microsoft.Extensions.Primitives.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
@@ -115,24 +109,6 @@
115109
<Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
116110
<HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
117111
</Reference>
118-
<Reference Include="MySql.Data, Version=9.1.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
119-
<HintPath>..\packages\MySql.Data.9.1.0\lib\net48\MySql.Data.dll</HintPath>
120-
</Reference>
121-
<Reference Include="MySqlConnector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92, processorArchitecture=MSIL">
122-
<HintPath>..\packages\MySqlConnector.2.4.0\lib\net48\MySqlConnector.dll</HintPath>
123-
</Reference>
124-
<Reference Include="Npgsql, Version=4.1.14.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
125-
<HintPath>..\packages\Npgsql.4.1.14\lib\net461\Npgsql.dll</HintPath>
126-
</Reference>
127-
<Reference Include="SQLitePCLRaw.batteries_v2, Version=2.1.10.2445, Culture=neutral, PublicKeyToken=8226ea5df37bcae9, processorArchitecture=MSIL">
128-
<HintPath>..\packages\SQLitePCLRaw.bundle_e_sqlite3.2.1.10\lib\net461\SQLitePCLRaw.batteries_v2.dll</HintPath>
129-
</Reference>
130-
<Reference Include="SQLitePCLRaw.core, Version=2.1.10.2445, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
131-
<HintPath>..\packages\SQLitePCLRaw.core.2.1.10\lib\netstandard2.0\SQLitePCLRaw.core.dll</HintPath>
132-
</Reference>
133-
<Reference Include="SQLitePCLRaw.provider.dynamic_cdecl, Version=2.1.10.2445, Culture=neutral, PublicKeyToken=b68184102cba0b3b, processorArchitecture=MSIL">
134-
<HintPath>..\packages\SQLitePCLRaw.provider.dynamic_cdecl.2.1.10\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll</HintPath>
135-
</Reference>
136112
<Reference Include="System" />
137113
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
138114
<HintPath>..\sample-apps\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
@@ -146,17 +122,8 @@
146122
<HintPath>..\packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
147123
</Reference>
148124
<Reference Include="System.Core" />
149-
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
150-
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
151-
</Reference>
152-
<Reference Include="System.Data.SQLite.EF6, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
153-
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.119.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
154-
</Reference>
155-
<Reference Include="System.Data.SQLite.Linq, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
156-
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.119.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
157-
</Reference>
158-
<Reference Include="System.Diagnostics.DiagnosticSource, Version=9.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
159-
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.9.0.2\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
125+
<Reference Include="System.Diagnostics.DiagnosticSource, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
126+
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.6.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
160127
</Reference>
161128
<Reference Include="System.Drawing" />
162129
<Reference Include="System.IdentityModel" />
@@ -166,8 +133,8 @@
166133
<Reference Include="System.IO.FileSystem.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
167134
<HintPath>..\packages\System.IO.FileSystem.AccessControl.5.0.0\lib\net461\System.IO.FileSystem.AccessControl.dll</HintPath>
168135
</Reference>
169-
<Reference Include="System.IO.Pipelines, Version=9.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
170-
<HintPath>..\packages\System.IO.Pipelines.9.0.2\lib\net462\System.IO.Pipelines.dll</HintPath>
136+
<Reference Include="System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
137+
<HintPath>..\packages\System.IO.Pipelines.6.0.0\lib\net462\System.IO.Pipelines.dll</HintPath>
171138
</Reference>
172139
<Reference Include="System.Management" />
173140
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -198,11 +165,11 @@
198165
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
199166
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
200167
</Reference>
201-
<Reference Include="System.Text.Encodings.Web, Version=9.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
202-
<HintPath>..\packages\System.Text.Encodings.Web.9.0.2\lib\net462\System.Text.Encodings.Web.dll</HintPath>
168+
<Reference Include="System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
169+
<HintPath>..\packages\System.Text.Encodings.Web.6.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
203170
</Reference>
204-
<Reference Include="System.Text.Json, Version=9.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
205-
<HintPath>..\packages\System.Text.Json.9.0.2\lib\net462\System.Text.Json.dll</HintPath>
171+
<Reference Include="System.Text.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
172+
<HintPath>..\packages\System.Text.Json.6.0.0\lib\net462\System.Text.Json.dll</HintPath>
206173
</Reference>
207174
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
208175
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
@@ -246,19 +213,17 @@
246213
<None Include="packages.config" />
247214
</ItemGroup>
248215
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
249-
<Import Project="..\packages\Microsoft.Data.SqlClient.SNI.5.2.0\build\net462\Microsoft.Data.SqlClient.SNI.targets" Condition="Exists('..\packages\Microsoft.Data.SqlClient.SNI.5.2.0\build\net462\Microsoft.Data.SqlClient.SNI.targets')" />
250216
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
251217
<PropertyGroup>
252218
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
253219
</PropertyGroup>
254-
<Error Condition="!Exists('..\packages\Microsoft.Data.SqlClient.SNI.5.2.0\build\net462\Microsoft.Data.SqlClient.SNI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Data.SqlClient.SNI.5.2.0\build\net462\Microsoft.Data.SqlClient.SNI.targets'))" />
255220
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
256221
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
257-
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
222+
<Error Condition="!Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets'))" />
258223
</Target>
259224
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
260-
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
225+
<Import Project="..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" />
261226
<!-- <Target Name="AfterBuild">
262227
<Exec Command="powershell -ExecutionPolicy Bypass -File &quot;$(SolutionDir)pack-dotnetframework.ps1&quot;" />
263228
</Target> -->
264-
</Project>
229+
</Project>

Aikido.Zen.DotNetFramework/Aikido.Zen.DotNetFramework.nuspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
<readme>content\README.md</readme>
2323
</metadata>
2424
<files>
25-
<file src="Aikido.Zen.DotNetFramework.targets" target="Build\" />
25+
<file src="Aikido.Zen.DotNetFramework.targets" target="Build" />
2626
<file src="bin\Release\libraries\libzen_internals_x86_64-pc-windows-gnu.dll" target="Build\libraries\" />
2727
<file src="bin\Release\libraries\libzen_internals_x86_64-pc-windows-gnu.dll.sha256sum" target="Build\libraries\" />
28+
<file src="bin\Release\Aikido.Zen.Core.dll" target="Build" />
2829
<file src="bin\Release\Aikido.Zen.Core.dll" target="lib" />
2930
<file src="bin\Release\Aikido.Zen.DotNetFramework.dll" target="lib" />
3031
<file src="content\README.md" target="content" />

Aikido.Zen.DotNetFramework/Aikido.Zen.DotNetFramework.targets

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,27 @@
99
<Link>libraries\libzen_internals_x86_64-pc-windows-gnu.dll.sha256sum</Link>
1010
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1111
</None>
12-
<!-- Ensure Aikido.Zen.Core.dll is copied to the output directory -->
1312
<Reference Include="Aikido.Zen.Core">
13+
<HintPath>$(MSBuildThisFileDirectory)..\lib\Aikido.Zen.Core.dll</HintPath>
14+
<Private>True</Private>
15+
</Reference>
16+
<Reference Include="Aikido.Zen.DotNetFramework">
17+
<HintPath>$(MSBuildThisFileDirectory)..\lib\Aikido.Zen.DotNetFramework.dll</HintPath>
1418
<Private>True</Private>
1519
</Reference>
1620
</ItemGroup>
1721

1822
<Target Name="CopyLibraries" AfterTargets="Build">
1923
<ItemGroup>
2024
<!-- Define a new item group for the specific files to copy -->
21-
<LibraryFiles Include="@(None)" Condition="'%(FileName)' == 'libzen_internals_x86_64-pc-windows-gnu'" />
25+
<LibraryFiles Include="$(MSBuildThisFileDirectory)libraries\libzen_internals_x86_64-pc-windows-gnu.dll">
26+
<DestinationDir>libraries</DestinationDir>
27+
</LibraryFiles>
28+
<LibraryFiles Include="$(MSBuildThisFileDirectory)libraries\libzen_internals_x86_64-pc-windows-gnu.dll.sha256sum">
29+
<DestinationDir>libraries</DestinationDir>
30+
</LibraryFiles>
2231
</ItemGroup>
23-
<Copy SourceFiles="@(LibraryFiles)" DestinationFolder="$(OutputPath)libraries\" />
32+
<Message Importance="high" Text="Copying @(LibraryFiles) to bin" />
33+
<Copy SourceFiles="@(LibraryFiles)" DestinationFolder="$(OutputPath)%(LibraryFiles.DestinationDir)" />
2434
</Target>
2535
</Project>
Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following
@@ -20,16 +19,7 @@
2019

2120
// The following GUID is for the ID of the typelib if this project is exposed to COM
2221
[assembly: Guid("e25d0127-765e-49e7-85e5-4b45e19499b2")]
23-
24-
// Version information for an assembly consists of the following four values:
25-
//
26-
// Major Version
27-
// Minor Version
28-
// Build Number
29-
// Revision
30-
//
31-
// You can specify all the values or you can default the Build and Revision Numbers
32-
// by using the '*' as shown below:
33-
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]
22+
// we need to manually set the assembly version, since the Directory.Build.props is not being used
23+
// need to fix this in the future
24+
[assembly: AssemblyVersion("1.2.1")]
25+
[assembly: AssemblyFileVersion("1.2.1.0")]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Aikido Zen for .NET Framework
2+
3+
## Diagnostics
4+
5+
If you're experiencing issues with the Aikido Zen agent, you can use the built-in diagnostic tools to troubleshoot.
6+
7+
### Enabling the Diagnostics Page
8+
9+
Add the following to your `web.config` file:
10+
11+
```xml
12+
<configuration>
13+
<system.webServer>
14+
<handlers>
15+
<add name="AikidoZenDiagnostics" path="aikido-diagnostics" verb="*" type="Aikido.Zen.DotNetFramework.DiagnosticsHandler" />
16+
</handlers>
17+
</system.webServer>
18+
</configuration>
19+
```
20+
21+
### Securing the Diagnostics Page
22+
23+
For security, you can set an environment variable to require a key for accessing the diagnostics page:
24+
25+
```
26+
AIKIDO_DIAGNOSTICS_KEY=your_secret_key
27+
```
28+
29+
Then access the page with:
30+
31+
```
32+
http://your-site/aikido-diagnostics?key=your_secret_key
33+
```
34+
35+
### Troubleshooting Background Task Issues
36+
37+
If the background task is not running (showing status "WaitingForActivation"), you can:
38+
39+
1. Visit the diagnostics page
40+
2. Click the "Restart Agent" button
41+
3. Check the new status
42+
43+
### Enabling Debug Logging
44+
45+
To see more detailed logs, set the following environment variable:
46+
47+
```
48+
AIKIDO_DEBUG=true
49+
```
50+
51+
### Common Issues
52+
53+
#### Background Task Not Running
54+
55+
If the background task shows "WaitingForActivation" status:
56+
57+
1. Make sure your application pool is configured correctly
58+
2. Try restarting the agent using the diagnostics page
59+
3. Check for any exceptions in the Application Event Log
60+
61+
#### No Logs in Debug Output
62+
63+
If you're not seeing logs in the debug output:
64+
65+
1. Make sure `AIKIDO_DEBUG` is set to `true`
66+
2. Check if you have a custom logger configured that might be capturing the logs
67+
3. Look for logs in the console output or application event log
68+
69+
## Programmatic Access to Diagnostics
70+
71+
You can also access the diagnostics programmatically:
72+
73+
```csharp
74+
// Get the current status of the agent
75+
string status = Aikido.Zen.DotNetFramework.Zen.GetAgentStatus();
76+
77+
// Restart the agent
78+
string result = Aikido.Zen.DotNetFramework.Zen.RestartAgent();
79+
```

0 commit comments

Comments
 (0)