Net 5.x Support

110 views
Skip to first unread message

rjone...@gmail.com

unread,
Apr 2, 2021, 10:52:48 AM4/2/21
to Abot Web Crawler
Does Abotx support Net 5.x?  I ask because I'm trying to get the demo code to work (shown under 'Using AbotX at https://github.com/sjdirect/abotx) and it fails with the following error: Unhandled exception. System.Security.Cryptography.CryptographicException: ASN1 corrupted data.

TEST ENVIRONMENT
Visual Studio 2019 for Mac
net5.0

I created a new project, used nuget to install AbotX, then inserted the demo code and tried to run.  Got the above error.

Note that when I repeated these steps using Visual Studio 2019 on Windows10 and using the NETFramework 4.7.1, it runs just fine.

I figured that if AbotX supports Net Standard 2.0, it would support net5.0.  

Thanks,

Rob Jones

rjone...@gmail.com

unread,
Apr 2, 2021, 12:44:13 PM4/2/21
to Abot Web Crawler
Thought it might be more helpful to post the complete exception message that I get:

Unhandled exception. System.Security.Cryptography.CryptographicException: ASN1 corrupted data.
   at System.Security.Cryptography.EccKeyFormatHelper.GetSpecifiedECCurveCore(SpecifiedECDomain specifiedParameters)
   at System.Security.Cryptography.EccKeyFormatHelper.GetSpecifiedECCurve(SpecifiedECDomain specifiedParameters)
   at System.Security.Cryptography.EccKeyFormatHelper.GetCurve(ECDomainParameters domainParameters)
   at System.Security.Cryptography.EccKeyFormatHelper.FromECPublicKey(ReadOnlyMemory`1 key, AlgorithmIdentifierAsn& algId, ECParameters& ret)
   at System.Security.Cryptography.KeyFormatHelper.ReadSubjectPublicKeyInfo[TRet](String[] validOids, ReadOnlyMemory`1 source, KeyReader`1 keyReader, Int32& bytesRead, TRet& ret)
   at System.Security.Cryptography.KeyFormatHelper.ReadSubjectPublicKeyInfo[TRet](String[] validOids, ReadOnlySpan`1 source, KeyReader`1 keyReader, Int32& bytesRead, TRet& ret)
   at System.Security.Cryptography.ECDsa.ImportSubjectPublicKeyInfo(ReadOnlySpan`1 source, Int32& bytesRead)
   at Portable.Licensing.Security.Cryptography.NativeSigner.VerifySignature(Byte[] documentToSign, Byte[] signature, String publicKey)
   at Portable.Licensing.License.VerifySignature(String publicKey)
   at Portable.Licensing.Validation.LicenseValidationExtensions.<>c__DisplayClass4_0.<Signature>b__0(License license)
   at Portable.Licensing.Validation.ValidationChainBuilder.AssertValidLicense()+MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at AbotX2.Util.Pll.Validate()
   at AbotX2.Util.Pll..ctor(FileInfo file)
   at AbotX2.Util.Pll..ctor()
   at AbotX2.Util.Pll.get_Instance()
   at AbotX2.Core.PhantomJsRenderer..ctor(CrawlConfigurationX config)
   at AbotX2.Core.ImplementationOverride..ctor(CrawlConfigurationX config, ImplementationContainer implementationContainer)
   at AbotX2.Core.ImplementationOverride..ctor(CrawlConfigurationX config)
   at AbotX2.Crawler.CrawlerX..ctor(CrawlConfigurationX configX)
   at AbotXTesting.Program.DemoCrawlerX_AutoTuning(Uri siteToCrawl) in /Users/rjones/Projects/AbotXTesting/Program.cs:line 100

rjone...@gmail.com

unread,
Apr 2, 2021, 6:30:12 PM4/2/21
to Abot Web Crawler
More info.  I discovered that this works with netcore3.1.  Also, here is the complete error context when running under net5.0:

C:\Users\rjones\Documents\Visual Studio 2019\Projects\AbotXTesting\AbotX-NetCore5\bin\Debug\net5.0>AbotX-NetCore5.exe
Unhandled exception. System.Security.Cryptography.CryptographicException: ASN1 corrupted data.
   at System.Security.Cryptography.EccKeyFormatHelper.GetSpecifiedECCurveCore(SpecifiedECDomain specifiedParameters)
   at System.Security.Cryptography.EccKeyFormatHelper.GetSpecifiedECCurve(SpecifiedECDomain specifiedParameters)
   at System.Security.Cryptography.EccKeyFormatHelper.GetCurve(ECDomainParameters domainParameters)
   at System.Security.Cryptography.EccKeyFormatHelper.FromECPublicKey(ReadOnlyMemory`1 key, AlgorithmIdentifierAsn& algId, ECParameters& ret)
   at System.Security.Cryptography.KeyFormatHelper.ReadSubjectPublicKeyInfo[TRet](String[] validOids, ReadOnlyMemory`1 source, KeyReader`1 keyReader, Int32& bytesRead, TRet& ret)
   at System.Security.Cryptography.KeyFormatHelper.ReadSubjectPublicKeyInfo[TRet](String[] validOids, ReadOnlySpan`1 source, KeyReader`1 keyReader, Int32& bytesRead, TRet& ret)
   at System.Security.Cryptography.ECDsa.ImportSubjectPublicKeyInfo(ReadOnlySpan`1 source, Int32& bytesRead)
   at Portable.Licensing.Security.Cryptography.NativeSigner.VerifySignature(Byte[] documentToSign, Byte[] signature, String publicKey)
   at Portable.Licensing.License.VerifySignature(String publicKey)
   at Portable.Licensing.Validation.LicenseValidationExtensions.<>c__DisplayClass4_0.<Signature>b__0(License license)
   at Portable.Licensing.Validation.ValidationChainBuilder.AssertValidLicense()+MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at AbotX2.Util.Pll.Validate()
   at AbotX2.Util.Pll..ctor(FileInfo file)
   at AbotX2.Util.Pll..ctor()
   at AbotX2.Util.Pll.get_Instance()
   at AbotX2.Core.PhantomJsRenderer..ctor(CrawlConfigurationX config)
   at AbotX2.Core.ImplementationOverride..ctor(CrawlConfigurationX config, ImplementationContainer implementationContainer)
   at AbotX2.Core.ImplementationOverride..ctor(CrawlConfigurationX config)
   at AbotX2.Crawler.CrawlerX..ctor(CrawlConfigurationX configX)
   at AbotX_NetCore5.Program.DemoCrawlerX_PauseResumeStop(Uri siteToCrawl) in C:\Users\rjones\Documents\Visual Studio 2019\Projects\AbotXTesting\AbotX-NetCore5\Program.cs:line 38
   at AbotX_NetCore5.Program.Main(String[] args) in C:\Users\rjones\Documents\Visual Studio 2019\Projects\AbotXTesting\AbotX-NetCore5\Program.cs:line 29
   at AbotX_NetCore5.Program.<Main>(String[] args)


On Friday, April 2, 2021 at 7:52:48 AM UTC-7 rjone...@gmail.com wrote:

sjdirect

unread,
Apr 9, 2021, 4:56:18 PM4/9/21
to Abot Web Crawler
You can follow the status of this in the github issue.
Reply all
Reply to author
Forward
0 new messages