Indice.Services 8.65.0

dotnet add package Indice.Services --version 8.65.0
                    
NuGet\Install-Package Indice.Services -Version 8.65.0
                    
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="Indice.Services" Version="8.65.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Indice.Services" Version="8.65.0" />
                    
Directory.Packages.props
<PackageReference Include="Indice.Services" />
                    
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 Indice.Services --version 8.65.0
                    
#r "nuget: Indice.Services, 8.65.0"
                    
#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 Indice.Services@8.65.0
                    
#: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=Indice.Services&version=8.65.0
                    
Install as a Cake Addin
#tool nuget:?package=Indice.Services&version=8.65.0
                    
Install as a Cake Tool

Indice.Services

A comprehensive library of infrastructure service abstractions and implementations for .NET applications. This package provides production-ready integrations with Azure services and popular third-party providers for common application needs.

NuGet

Installation

dotnet add package Indice.Services

Features

📁 File Storage

Store and retrieve files using different backing stores:

Implementation Description
FileServiceAzureStorage Azure Blob Storage
FileServiceLocal Local file system
FileServiceInMemory In-memory (for testing)
// Azure Blob Storage
services.AddFilesAzure(options => {
    options.ConnectionStringName = "StorageConnection";
    options.ContainerName = "my-container";
});

// Local file system
services.AddFilesLocal(options => {
    options.Path = "uploads";
});
🔧 Configuration (Azure Storage)

AzureClientFactory resolves the connection by ConnectionStringName (StorageConnection by default):

  • First from ConnectionStrings:{ConnectionStringName} (or a direct value with the same key)
  • Otherwise from managed-identity settings under {ConnectionStringName}

Standard connection string:

{
  "ConnectionStrings": {
    "StorageConnection": "DefaultEndpointsProtocol=https;AccountName=<NAME>;AccountKey=xxx;EndpointSuffix=core.windows.net"
  }
}

Managed Identity (system-assigned):

{
  "StorageConnection": {
    "accountName": "<NAME>",
    "serviceUri": "<SERVICE_URI>"
  }
}

Managed Identity (user-assigned):

{
  "StorageConnection": {
    "accountName": "<NAME>",
    "serviceUri": "<SERVICE_URI>",
    "clientId": "<CLIENT_ID>"
  }
}

For Azure Functions host, you need to provide these extra values too:

AzureWebJobsStorage__accountName = <NAME>
AzureWebJobsStorage__serviceUri = <BASE_SERVICE_URL>

For user-assigned Managed Identity, add this too:

AzureWebJobsStorage__clientId = <CLIENT_ID>

Proper RBAC roles to be assigned to the Managed Identity:

  • Storage Account Contributor
  • Storage Blob Data Owner
  • Storage Queue Data Contributor
  • Storage Queue Data Message Processor
  • Storage Queue Data Message Sender
  • Storage Queue Data Reader

📧 Email Services

Send emails through various providers with template rendering support:

Provider key (Email:Provider) Service Name Add method Configuration section
Smtp EmailServiceSmtp services.AddEmailServiceSmtp(configuration) Email
SendGrid EmailServiceSendGrid services.AddEmailServiceSendGrid(configuration) SendGrid
SparkPost EmailServiceSparkPost services.AddEmailServiceSparkPost(configuration) SparkPost
Brevo EmailServiceBrevo services.AddEmailServiceBrevo(configuration) Brevo
WeMail EmailServiceWeMail services.AddEmailServiceWeMail(configuration) WeMail
AzureCommunicationServices AzureCommunicationServicesEmailService services.AddEmailServiceAzureCommunicationServices(configuration) AzureCommunicationServices
None EmailServiceNoop services.AddEmailServiceNoop() -
// Auto-discover provider from configuration
services.AddEmailService(configuration);

Configuration examples (appsettings.json):

SMTP:

{
  "Email": {
    "Provider": "Smtp",
    "Sender": "noreply@example.com",
    "SenderName": "My App",
    "SmtpHost": "smtp.example.com",
    "SmtpPort": 587,
    "Username": "smtp-user",
    "Password": "smtp-password"
  }
}

SendGrid:

{
  "Email": {
    "Provider": "SendGrid"
  },
  "SendGrid": {
    "Sender": "noreply@example.com",
    "SenderName": "My App",
    "ApiKey": "<sendgrid-api-key>",
    "Api": "https://api.sendgrid.com/v3/"
  }
}

SparkPost:

{
  "Email": {
    "Provider": "SparkPost"
  },
  "SparkPost": {
    "Sender": "noreply@example.com",
    "SenderName": "My App",
    "ApiKey": "<sparkpost-api-key>",
    "Api": "https://api.eu.sparkpost.com/api/v1/"
  }
}

Brevo:

{
  "Email": {
    "Provider": "Brevo"
  },
  "Brevo": {
    "Sender": "noreply@example.com",
    "SenderName": "My App",
    "ApiKey": "<brevo-api-key>",
    "Api": "https://api.brevo.com/v3/"
  }
}

WeMail:

{
  "Email": {
    "Provider": "WeMail"
  },
  "WeMail": {
    "Sender": "noreply@example.com",
    "SenderName": "MyApp",
    "ApiKey": "<api-key>"
  }
}

Azure Communication Services:

{
  "Email": {
    "Provider": "AzureCommunicationServices"
  },
  "AzureCommunicationServices": {
    "Sender": "DoNotReply@<your-domain>",
    "ClientId": "<app-client-id>",
    "ClientSecret": "<app-client-secret>",
    "TenantId": "<tenant-id>",
    "ResourceEndpoint": "https://<resource-name>.<region>.communication.azure.com",
    "WaitUntilCompleted": false
  }
}

📱 SMS Services

Send SMS messages through multiple gateway providers:

Provider key (Sms:Provider) Implementation Add method Required configuration keys (under Sms)
apifon SmsServiceApifon services.AddSmsServiceApifon(configuration) ApiKey, Token, Sender (or SenderName)
apifon_im / apifonim SmsServiceApifonIM services.AddSmsServiceApifonIM(configuration) ApiKey, Token, Sender (or SenderName)
kapatel / kapa_tel SmsServiceKapaTEL services.AddSmsServiceKapaTEL(configuration) Username, Password, From
mstat SmsServiceOmniMessaging services.AddSmsServiceOmniMessaging(configuration) ApiKey, SenderName, AccountId
smsup SmsServiceSmsUP services.AddSmsServiceSmsUp(configuration) ApiKey, Sender
twilio SmsServiceTwilio services.AddSmsServiceTwilio(configuration) AccountSid, plus (ApiKey + Secret) or (AuthToken), and SenderPhoneNumber or MessagingServiceSid
vonage SmsServiceVonage services.AddSmsServiceVonage(configuration) ApiKey, SignatureSecret, Sender (or SenderName)
yuboto / yuboto_omni SmsServiceYubotoOmni services.AddSmsServiceYubotoOmni(configuration) ApiKey, Sender (or SenderName)
yuboto_viber / yubotoviber / yuboto_omni_viber SmsServiceYubotoOmniViber services.AddSmsServiceYubotoOmniViber(configuration) ApiKey, Sender (or SenderName), optional ViberFallbackEnabled
noop / none SmsServiceNoop services.AddSmsServiceNoop() -
// Auto-discover provider(s) from Sms:Provider
services.AddSmsService(configuration);
{
  "Sms": {
    "Provider": "twilio",
    "Sender": "MyApp",
    "AccountSid": "<account-sid>",
    "AuthToken": "<auth-token>",
    "SenderPhoneNumber": "+15551234567"
  }
}

🔗 Webhooks

Webhook services can be registered independently of SMS and email services, allowing webhook handling for SMS and email providers or other integrations.

Register the core webhook services with your IWebhookHandler and add the provider specific HTTP handlers through the returned WebhooksBuilder:

builder.AddWebhooks<YourWebhookHandler>(options => options.ChannelCapacity = 200)
       .AddSmsWebhooks()    // handler of the configured Sms:Provider
       .AddEmailWebhooks()  // handler of the configured email provider
       .AddHttpHandler<YourWebhookHttpHandler>("your-provider");

Configuration:

{
  "Webhooks": {
    "Enabled": true,
    "ChannelCapacity": 100
  }
}
  • Enabled: Enables or disables webhook processing. Defaults to true. When disabled, the webhook endpoints return 404.
  • ChannelCapacity: Maximum number of pending webhook batches. Must be greater than zero.

Events are processed asynchronously by the hosted WebhookEventSink.

Currently supported SMS providers: apifon, kapatel, omnimessaging, smsup, twilio, vonage, yuboto.<br/> Currently supported email providers: Brevo, SendGrid, SparkPost.

Don't forget to also register Webhook endpoints for accepting and processing events:

app.MapWebhooks();

🔔 Push Notifications

Send push notifications via Azure Notification Hubs:

services.AddPushNotificationServiceAzure((sp, options) => {
    options.ConnectionString = "your-connection-string";
    options.NotificationHubPath = "your-hub-name";
});

📤 Event Dispatching

Dispatch events asynchronously using queue-based messaging:

Implementation Backing Store
EventDispatcherAzure Azure Queue Storage
EventDispatcherAzureServiceBus Azure Service Bus
EventDispatcherHostingHttp A remote workers API (Indice.Features.Workers.Server) over HTTP — publish only
EventDispatcherInMemory In-memory (for testing)
services.AddEventDispatcherAzure(configuration);

// Raise events
await eventDispatcher.RaiseEventAsync(new OrderCreatedEvent { OrderId = orderId });
Publishing to a remote workers API

AddEventDispatcherHostingHttp() posts each event to POST {BaseAddress}/workers/queues/{queueName}/messages of a remote workers API, so it lands in the same relational queue that EventDispatcherHosting uses in-process, and is consumed by the workers hosted along with that API. It authenticates with the client credentials flow; the client must be allowed the workers:producer scope.

services.AddEventDispatcherHostingHttp((sp, options) => {
    options.BaseAddress = new Uri("https://workers.indice.gr/api"); // Default: General:Endpoints:Workers
    options.Authority = "https://identity.indice.gr";                // Default: General:AuthorityInternal or General:Authority
    options.ClientId = "my-service";                                 // Default: General:Api:Secrets:ClientId
    options.ClientSecret = "...";                                    // Default: General:Api:Secrets:ClientSecret
});
// Or keyed: services.AddEventDispatcherHostingHttp("workers", (sp, options) => ...);
Option Default Description
BaseAddress General:Endpoints:Workers The base address of the workers API.
PathPrefix workers The path of the workers endpoints relative to BaseAddress.
Authority / TokenEndpoint General:Authority / {Authority}/connect/token Where the access token is requested.
ClientId / ClientSecret General:Api:Secrets The machine client. No token is attached when ClientId is empty.
Scope workers:producer The scope requested.
Enabled true Turns dispatching off.
JsonSerializerOptions Same as the workers Serializes the payload.

The event is sent as is (no envelope), the way the workers read it, so wrap, prependEnvironmentInQueueName and sessionId are ignored. The queue name defaults to the kebab-case name of the event type (OrderCreatedEvent → order-created-event): name the worker queue the same, or pass queueName. A failed request throws an HttpRequestException. The HTTP client is named EventDispatcherHostingHttp.HttpClientName ({HttpClientName}:{name} when keyed), so you can add handlers to it. Retrying a POST that reached the server may enqueue the message twice.

🔒 Distributed Locking

Coordinate distributed operations using lease-based locking:

Implementation Backing Store
LockManagerAzure Azure Blob Storage leases
LockManagerInMemory In-memory (for testing)
services.AddLockManagerAzure(configuration);

// Acquire and use a lock
await using var lease = await lockManager.AcquireLock("my-resource", TimeSpan.FromSeconds(30));
if (lease.IsAcquired) {
    // Perform exclusive operation
}

📡 SignalR Proxy

Proxy SignalR connections through Azure SignalR Service:

services.AddSignalRProxyServices(configuration);

Configuration

Most services auto-configure from IConfiguration. Common connection string names:

Service Connection String Name
File Storage StorageConnection
Event Dispatcher StorageConnection
Lock Manager StorageConnection
Service Bus ServiceBusConnection

Dependencies

Target Frameworks

  • .NET 8.0
  • .NET 9.0

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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 is compatible.  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 (9)

Showing the top 5 NuGet packages that depend on Indice.Services:

Package Downloads
Indice.AspNetCore

Package Description

Indice.Hosting

Package Description

Indice.Features.Messages.Core

Package Description

Indice.Features.Messages.Worker.Azure

Package Description

Indice.Features.Multitenancy.Worker.Azure

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.65.0 0 11/18/2026
8.64.1 624 11/11/2026
8.64.0 642 11/6/2026
8.63.0 905 11/2/2026
8.62.0 1,047 10/30/2026
8.61.1 667 10/27/2026
8.61.0 516 10/26/2026
8.60.0 615 10/22/2026
8.59.1 447 11/4/2026
8.59.0 659 10/20/2026
8.58.0 903 10/7/2026
8.57.0 2,149 9/23/2026
8.56.0 867 9/7/2026
8.55.0 651 9/3/2026
8.54.0 1,370 7/23/2026
8.53.0 711 7/21/2026
8.52.0 1,223 7/17/2026
8.51.1 623 7/10/2026
8.51.0 652 7/7/2026
8.50.0 1,677 6/25/2026
Loading failed