Bug 59221 - System.MissingMethodException: Method 'System.Security.Cryptography.ECDsaCng.set_HashAlgorithm' not found
Summary: System.MissingMethodException: Method 'System.Security.Cryptography.ECDsaCng....
Status: CONFIRMED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Core (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-05 02:11 UTC by Peter Yang
Modified: 2017-09-11 11:12 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Peter Yang 2017-09-05 02:11:19 UTC
Hi Supported Team,

I'm working on a .NET project that needs to run on Linux. In my project, we use IdentityServer4 to implement our authentication. It can work well on Windows OS, but when it runs on Linux, it throws an unhandled exception: System.MissingMethodException: Method 'System.Security.Cryptography.ECDsaCng.set_HashAlgorithm' not found. I view the source code and find it call ECDsaCng inside. So I created an simple like below and ran it on Linux with Mono and get the same exception.

The following code snippet is my testing code:

public static void Main(string[] args)
{
    ECDsaCng ecdsaCng = new ECDsaCng();
    ecdsaCng.HashAlgorithm = new CngAlgorithm(string.Empty)
}

My develop environment information:

.NET Framework: 4.5.2
Mono: 5.2.0.215 (tarball Mon Aug 14 15:46:12 UTC 2017)
Ubuntu: 16.04


Thanks,
Peter

Note You need to log in before you can comment on or make changes to this bug.