GSMClients.Web.Core 1.0.8

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

GSMClients.Web.Core ✨

Global Session Manager ( GSM ) Client library for .NET Core Web Applications. Provides easy integration with GSM Server for:

Features 🎉

  • Session Managment 🔐 : SSO :-
    • Single Active Session (SSA) Ensures only one active session per user across apps.
    • Single Active User Per Device (SAUPD) Restricts multiple logins from same device.
  • Push Notifications 🔔 : Real-Time alerts instantly to connected clients
  • Scheduled Triggers ⏰ : Automates periodic tasks like session cleanup and Notifications.

Installation 🛠️

Install via NuGet:

dotnet add package GSMClients.Web.Core

Steps 💡

There are two simple steps to follow:

1. GSM Configuration :-

In your Login Controller, add the following lines to retrieve the GSM Token:

var gsmData = await GSMClient.InitializeAsync(
    loggedUserId: "", // Logged User Id,
    baseUrl     : "", // Update your GSM URL,
    clientId    : "", // Update your Client Id,
    clientSecret: "", // Update your Client Secret,
    sessionId   : Guid.NewGuid().ToString(),
    sessionIp   : HttpContext.Connection.RemoteIpAddress?.ToString() ?? ""
);
// ✅ You will receive the connection details in the gsmData variable. Simply pass the same gsmData to your view page to establish the connection.

2. GSM Initializtion :-

Add JS Libraries in View Layout Pages.

<script src="~/_content/GSMClients.Web.Core/signalr-7.0.5.min.js"></script>
<script src="~/_content/GSMClients.Web.Core/GSM-client-1.0.0.min.js"></script> 

/**
 * ✨ After receiving the gsmData from the Controller, trigger this JS function.
 */
async function gsmConnector(gsmData) {
    const gsmClient = new GSMClient({
        apiUrl  : gsmData.BaseUrl,
        token   : gsmData.Token,
        userId  : gsmData.UserId,
        sessionId: gsmData.SessionId,
        sessionIp: gsmData.SessionIp,
        onRegisterSuccess: () => window.location.href = "/Home", // ✅ Add your Home Page / Login success redirection.
        onForceLogout: () => window.location.href = "/Logout"  // 🚫 Add the Logout Page / trigger the Logout Logic.
    });
    await gsmClient.connect();


 /* If you have multiple layouts, trigger this function from each layout,
    and replace the`onRegisterSuccess: () => window.location.href = "/Home"`
    line with `onRegisterSuccess: () => console.log("GSM successfully registered")`.
    Check the Browser Console! 
    Happy coding! ✨🎉 
  */
}


Using GSM Services 🚀:-

After configuring GSM, now you can trigger broadcasts for real-time messages or data, such as push notifications.

Service 1: Send message to specific user :-

var resUser = await GSMClients.Web.Core.GSMService.BroadcastToUserAsync(
    baseUrl : "",   // GSM Url
    token   : "",   // Generated token
    userId  : "",   // receiver login Id
    message : "",   // message
    ignoreCertErrors: true // ✅ for UAT - SSL exception
);

Service 2 : Send Message to all user :-

var resGroup = await GSMClients.Web.Core.GSMService.BroadcastToGroupAsync(
    baseUrl : "",
    token   : "", 
    message : "",
    ignoreCertErrors:  true // ✅ for UAT - SSL exception
);

Package Contents 📦

  • GSMClient.cs (C# helper class)

  • GSMService.cs (C# service class)

  • GSM-client-1.0.0.min.js (JavaScript client)

  • signalr-7.0.5.min.js (SignalR library)


Requirements ✅

  • .NET 6.0 or 8.0

  • ASP.NET Core Web App

We hope this is exactly what you were looking for! Let me know if you have any other requests. Thank you.. 😊

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 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 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.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

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.0.8 168 11/24/2025
1.0.7 384 11/18/2025
1.0.6 378 11/18/2025
1.0.5 380 11/18/2025
1.0.4 312 11/17/2025
1.0.3 318 11/17/2025
1.0.1 319 11/17/2025
1.0.0 315 11/17/2025