Support Captcha for linux hosting

1 Answer 51 Views
Captcha
NoobMaster
Top achievements
Rank 2
Iron
NoobMaster asked on 01 Feb 2024, 08:16 AM
System.Drawing is not support in linux OS

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 05 Feb 2024, 12:50 PM

Hello NoobMaster,

The "System.Drawing" library is designed for use with Windows and relies on GDI+ (Graphics Device Interface) which is not available on Linux systems. 

An alternative is the System.Drawing.Common package, which is a cross-platform implementation of System.Drawing for .NET Core and .NET 5+ applications. It's available on NuGet and can be used in Linux environments.

I hope this information helps.

Kind Regards,
Anton Mironov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
NoobMaster
Top achievements
Rank 2
Iron
commented on 06 Feb 2024, 05:49 AM | edited

Hello  Anton,

i know that, if you notice my question title you will know that I mean add support for Captcha to be working with Linux hosting.

because Kendo Captcha is using System.Drawing.

Thanks

 

 

NoobMaster
Top achievements
Rank 2
Iron
commented on 06 Feb 2024, 10:21 AM

this is what im getting in .Net 8 Web App: 

System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms.

NoobMaster
Top achievements
Rank 2
Iron
commented on 06 Feb 2024, 10:23 AM

History

  • System.Drawing started as a Windows-Only namespace
  • In 2018 the System.Drawing.Common package brought System.Drawing to cross-platform .NET Core projects
  • In 2021 the dotnet design team decided to only support Windows as a breaking change
  • In 2021 .NET 6 projects began warning CA1416: This call site is reachable on all platforms
  • In 2022 .NET 7 projects using System.Drawing.Common began throwing PlatformNotSupportedException
Anton Mironov
Telerik team
commented on 08 Feb 2024, 07:01 PM

Hi NoobMaster,

Thank you for the additional details provided.

Yes, you are totally correct - the described behavior is not supported for Linux at the moment.

Here is a Feature Request opened for the same:

Feel free to vote for the item. The most voted items are considered for future implementation.

Best Regards,
Anton Mironov

Tags
Captcha
Asked by
NoobMaster
Top achievements
Rank 2
Iron
Answers by
Anton Mironov
Telerik team
Share this question
or