Keisoft.Chat.Captcha.WebApi 9.0.2

dotnet add package Keisoft.Chat.Captcha.WebApi --version 9.0.2
                    
NuGet\Install-Package Keisoft.Chat.Captcha.WebApi -Version 9.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Keisoft.Chat.Captcha.WebApi" Version="9.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Keisoft.Chat.Captcha.WebApi" Version="9.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Keisoft.Chat.Captcha.WebApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Keisoft.Chat.Captcha.WebApi --version 9.0.2
                    
#r "nuget: Keisoft.Chat.Captcha.WebApi, 9.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Keisoft.Chat.Captcha.WebApi@9.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Keisoft.Chat.Captcha.WebApi&version=9.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Keisoft.Chat.Captcha.WebApi&version=9.0.2
                    
Install as a Cake Tool

This is a verification service library for chat application backends. Below is the usage example:


public class Program
{
    public static void Main(string[] args)
    {
        var builder = WebApplication.CreateBuilder(args);

        // Clear default logging providers.
        // builder.Logging.ClearProviders();
        // Configure NLog as the logging provider.
        builder.Host.UseNLog();

        // Add services to the container.

        // Suppress the default model validation filter in favor of the custom ValidateModelActionFilter.
        builder.Services.Configure<ApiBehaviorOptions>(options => options.SuppressModelStateInvalidFilter = true);

        builder.Services.AddControllers(options =>
        {
            options.Filters.Add<GlobalExceptionFilter>();
            // Register custom model validation filter.
            options.Filters.Add<ValidateModelActionFilter>();
        })
        // Configure JSON serialization settings.
        .AddJsonOptions(options =>
        {
            options.JsonSerializerOptions.Converters.Add(new JsonDateTimeConverter());
            options.JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping;
        });

        builder.Services.AddMemoryCache();
        // Register application service layer dependencies.
        builder.Services.AddServices();

        builder.Services.AddServiceOptions(options =>
        {
            options.UseRedis = builder.Configuration.GetSection("ServiceOptions:UseRedis").Get<bool>();
        });

        builder.Services.AddFilterOptions(options =>
        {
            var filterOptions = builder.Configuration.GetSection("FilterOptions");

            options.Interval = filterOptions.GetValue<int>("Interval");
            options.Frequency = filterOptions.GetValue<int>("Frequency");
        });

        // Retrieve email configuration from settings.
        var emailOptions = builder.Configuration.GetSection("EmailOptions").Get<EmailOptions>();
        // Register email configuration as a singleton service.
        builder.Services.AddSingleton(emailOptions);

        // Configure Redis connection (Singleton).
        builder.Services.AddSingleton<IConnectionMultiplexer>(sp =>
        {
            var configuration = builder.Configuration.GetSection("Redis").Get<ConfigurationOptions>();

            if (configuration == null)
            {
                throw new InvalidOperationException("Redis configuration is missing.");
            }

            var endPoints = builder.Configuration.GetSection("Redis:EndPoints").Get<string[]>();

            foreach (var item in endPoints)
            {
                configuration.EndPoints.Add(item);
            }

            // Register connection events for monitoring.
            var connection = ConnectionMultiplexer.Connect(configuration);

            connection.ConnectionFailed += (sender, args) =>
            {
                var logger = sp.GetService<ILogger<Program>>();
                logger?.LogError($"Redis connection failed: {args.Exception?.Message}");
            };

            connection.ConnectionRestored += (sender, args) =>
            {
                var logger = sp.GetService<ILogger<Program>>();
                logger?.LogInformation("Redis connection restored.");
            };

            return connection;
        });

        var app = builder.Build();

        if (app.Environment.IsDevelopment())
        {
            // Enable detailed exception page for development environment.
            app.UseDeveloperExceptionPage();
        }

        // Configure the HTTP request pipeline.
        app.UseRouting();

        app.MapControllers();

        app.Run();
    }
}

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.0.2 87 8/7/2026