Anomali.Shared.Library 1.1.28

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

Anomali Shared Library for Net6.

This library is internally used to build various projects by Anomali Studio.

Instruction

To build package:

  • Make sure it's on debug and go to Build > Pack AnomaliLibrary
  • Find the package at bin > debug > ....nupkg
  • Go to Nuget website and upload the package file there.

Add these in the Program.cs:

builder.Services.AddControllers(options ⇒ { options.Filters.Add(new GlobalExceptionFilter()); }); SharedLibrary.Configuration = app.Configuration;

Add these in the appsettings.json:

"EncKey": [INSERT STRONG PASSWORD], "Mailing": { "SenderEmail": "no-reply@anomalistudio.com", "SenderName": "Anomali Studio", "SupportEmail": "support@anomalistudio.com" }, "SMTP": { "Username": "localhost", "Port": 25, "Username": "", "Password": "", "IsUseSSL": false }

Available Classes

EncryptDecrypt

Encrypt
Decrypt

GlobalExceptionFilter

HttpClientRequest

GET
POST

HttpRequestExtensions

GetAbsoluteUri
GetPath
GetHost
GetUserDevice

MailService

SenderName
SenderEmail
Recipient
Subject
Body
Attachment

RandomChar

Alphabet
Numeric
AlphaNumeric

SharedLibrary

NewId
Base64Encode
Base64Decode
Base64EncodeFromImagePath
Slugify
TruncateText

FileManager

ReadDirectory
UploadFile

SharedResponseMsg

SuccessLoad (200001)
SuccesError (200002)
AuthInvalidUser (400001)
AuthInvalidPassword (400002)
AuthInvalidOTP (400003)
NullData (400004)
AuthUnauthorized (401001)
AuthForbidden (401002)
GlobalException (500001)

#Release Notes

##1.1.28 Handle null email address and skip if it's empty

##1.1.27 Add recipients cc and reply to

##1.1.26 Allow empty on email recipient to avoid throwing error when there is no recipient

##1.1.25 Add caching to email notification to avoid too many error notification being sent at the same time.

##1.1.22-24 Update internal server error wording, minor formatting improvement, and simplify error description

##1.1.21 Make log file process optional in case the server unable to write to the folder and update not found / internal server error message to avoid disclosing too much information

##1.1.20 Add a log file and fix handling error message coming from the API

##1.1.19 Fix bug on global exception filter.

##1.1.18 Update client request to handle the updated global exception filter.

##1.1.17 Update global exception to avoid sending error notification for non 5xx error.

##1.1.16 Add URL when there's an error doing http client request. Add MD5 Encoder

##1.1.15 Negate not found from exception filter.

##1.1.14 Add file type for attachment on Mail Service.

##1.1.13 Make it throw custom exception whenever there's issue calling external request. Handle double dash during Slugify.

##1.1.12 Improve file manager to accept custom server directory and update wording for shared response messages.

##1.1.11 Fix exception filter to show proper message instead of always trigger internal server error.

##1.1.10 Add some default response messages.

##1.1.9 Support form-data on HTTP Post.

##1.1.8 Not sending error email notificatio for 400 error.

##1.1.7 Fix bug on MailService to support SSL. Reorganize custom response message.

##1.1.6 Update MailService to prioritize TLS usage to support AWS.

##1.1.3 Not sending error email notification for 401 error.

##1.1.2 Improve global exception error to use error code and message from API. Update custom response message.

##1.1.1 Handle wwwroot on directory, shared response model.

##1.1.0 Improve Filemanager and add ability to delete file.

##1.0.6 Add Filemanager function to read folder and write file.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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
1.1.28 129 7/14/2025
1.1.27 131 7/14/2025
1.1.26 120 7/4/2025
1.1.25 138 12/2/2024
1.1.24 157 5/18/2024
1.1.23 135 5/17/2024
1.1.22 143 5/17/2024
1.1.21 146 5/17/2024
1.1.20 146 5/17/2024
1.1.19 137 5/15/2024
1.1.18 134 5/15/2024
1.1.17 127 5/15/2024
1.1.16 167 1/31/2024
1.1.15 323 2/14/2023
1.1.14 426 11/1/2022
1.1.13 496 9/7/2022
1.1.12 498 8/21/2022
1.1.11 509 8/13/2022
1.1.10 537 6/29/2022
1.1.9 543 6/25/2022
1.1.8 528 6/22/2022
1.1.7 497 6/22/2022
1.1.6 557 6/22/2022
1.1.5 546 6/22/2022
1.1.4 534 6/22/2022
1.1.3 536 6/22/2022
1.1.2 521 6/22/2022
1.1.1 541 6/20/2022
1.1.0 541 6/20/2022
1.0.6 525 6/20/2022
1.0.5 544 5/25/2022
1.0.4 641 2/9/2022
1.0.3 621 2/9/2022
1.0.2 599 2/8/2022
1.0.1 622 2/6/2022
1.0.0 628 2/6/2022

Update script to get host url