This repository has been archived by the owner. It is now read-only.

CoreCompat not work on windows based docker nano Server #21

AlirezaSalimi1 opened this Issue Jan 22, 2018 · 1 comment


None yet
2 participants

AlirezaSalimi1 commented Jan 22, 2018

I`m using DNTCaptcha 1.4.2 which is using CoreCompat
my project is based on ASP Core 1.1 when i deploy the project on docker nano server (microsoft/aspnetcore:1.1.5-nanoserver-sac2016) i face with this exception and captcha image was not showing in project:

System.TypeInitializationException: The type initializer for 'System.Drawing.KnownColors' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'gdiplus': The specified module could not be found. (Exception from HRESULT: 0x8007007E)at System.Drawing.GDIPlus.GdiplusStartup(UInt64& token, GdiplusStartupInput& input,GdiplusStartupOutput& output)at System.Drawing.GDIPlus..cctor()
--- End of inner exception stack trace ---
at System.Drawing.GDIPlus.RunningOnWindows() at System.Drawing.KnownColors..cctor()
--- End of inner exception stack trace ---
at System.Drawing.KnownColors.FindColorMatch(Color c)
at System.Drawing.ColorConverter.StaticConvertFromString(ITypeDescriptorContext context, String s, CultureInfo culture)at System.Drawing.ColorConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)at System.Drawing.ColorTranslator.FromHtml(String htmlColor)
at DNTCaptcha.Core.Providers.CaptchaImageProvider.DrawCaptcha(String message, String foreColor, String backColor, Single fontSize, String fontName)
at DNTCaptcha.Core.DNTCaptchaImageController.Show(String text, String rndDate, String foreColor,String backColor, Single fontSize, String fontName)
crit: DNTCaptcha.Core.DNTCaptchaImageController[1001]
DrawCaptcha error.


This comment has been minimized.


qmfrederik commented Jan 22, 2018

System.Drawing uses GDI+ as it's back-end. GDI+ is not available on Windows Nano server.
Your best bet as of now is to use either Server Core which I believe does include GDI+, or a Linux-based distribution.

If you're very adventurous, you can also try to compile libgdiplus ( for Nano server but that's outside the scope of this project ;-)

magicxor added a commit to magicxor/Hikkaba that referenced this issue Aug 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.