Egov.Integrations.MSign.Soap 8.0.19

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Egov.Integrations.MSign.Soap --version 8.0.19
                    
NuGet\Install-Package Egov.Integrations.MSign.Soap -Version 8.0.19
                    
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="Egov.Integrations.MSign.Soap" Version="8.0.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Egov.Integrations.MSign.Soap" Version="8.0.19" />
                    
Directory.Packages.props
<PackageReference Include="Egov.Integrations.MSign.Soap" />
                    
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 Egov.Integrations.MSign.Soap --version 8.0.19
                    
#r "nuget: Egov.Integrations.MSign.Soap, 8.0.19"
                    
#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 Egov.Integrations.MSign.Soap@8.0.19
                    
#: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=Egov.Integrations.MSign.Soap&version=8.0.19
                    
Install as a Cake Addin
#tool nuget:?package=Egov.Integrations.MSign.Soap&version=8.0.19
                    
Install as a Cake Tool

MSign SOAP Digital Signature

This package is intended for Service Provider integration built on ASP.NET Core 8.0+ with MSign using SOAP protocol for digital signature operations.

Getting Started

Please go through the following instructions to integrate your project with MSign.

Prerequisites

Before being able to integrate with MSign, a Service Provider, including its certificate, must be registered accordingly in MSign. MSign accepts certificates issued by STISC.

Installing

Install the following package from NuGet

Install-Package Egov.Integrations.MSign.Soap

Then follow the instructions from Configuration and Usage sections below.

Configuration

Add the following configuration section to your appsettings.json:

{
	...
	"Certificate": {
		"Path": "Files\\Certificates\\msign-sample.pfx",
		"Password": "yourpfxpassword"
	},
	"MSignSoap": {
		"ApiAddress": "https://msign.staging.egov.md:8443/MSign.svc",
		"FrontendAddress": "https://msign.staging.egov.md",
		"ServiceRootUrl": "https://localhost:44379"
	}
	...
}

where ServiceRootUrl is the base path of your published service.

Please note that your Service must be published using https protocol.

Usage

Add the following code snippet to your Startup.ConfigureServices method:

services.AddMSignSoapClient(builder.Configuration.GetSection("MSignSoap"));

In your controller, inject IMSignSoapClient and use it to create signature requests:

public class HomeController : ControllerBase
{
    private readonly IMSignSoapClient _msignClient;

    public HomeController(IMSignSoapClient msignClient)
    {
        _msignClient = msignClient;
    }

    public async Task<IActionResult> IndexAsync()
    {
        var requestID = await _msignClient.PostSignRequestAsync(new SignRequest
        {
            ShortContentDescription = "Sample HASH signature",
            ContentType = ContentType.Hash,
            Contents = new[]
            {
                new SignContent
                {
                    Content = SHA1.HashData(new byte[] { 0xDE, 0xAD, 0xBE, 0xEF })
                }
            }
        });

        // example Relay State
        var relayState = Guid.NewGuid().ToString();

        return Redirect(_msignClient.BuildRedirectAddress(requestID, Url.Action(nameof(MSignResponse))!, relayState));
    }

    public async Task<IActionResult> MSignResponse(string requestID, string relayState)
    {
        var response = await _msignClient.GetSignResponseAsync(requestID, null);

        if (response.Status == SignStatus.Success)
        {
            // Process successful signature
            return Ok();
        }

        // Handle signature failure
        return BadRequest(response.Message);
    }
}
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 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 (1)

Showing the top 1 NuGet packages that depend on Egov.Integrations.MSign.Soap:

Package Downloads
Egov.Fod.BackComponents

Standard backend components for FOD integrations including MDocs, MNotify, MSign, and MPower.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.2 197 4/9/2026
8.0.21 145 12/12/2025
8.0.20 144 12/11/2025
8.0.19 142 12/11/2025