Giter Site home page Giter Site logo

Ubuntu about dntcaptcha.core HOT 8 CLOSED

mina1917 avatar mina1917 commented on June 26, 2024
Ubuntu

from dntcaptcha.core.

Comments (8)

VahidN avatar VahidN commented on June 26, 2024 1

You should use a custom font for Linux systems, because they don't have the Tahoma by default.

from dntcaptcha.core.

VahidN avatar VahidN commented on June 26, 2024

You should checkout the server's logs and at least you should see what's the response of the requested image. Open the network's tab of the browser's developer tools and see the responses.
If you want to see the output of _logger.LogDebug, you should turn on this level of logging in the appsettings.json file.

from dntcaptcha.core.

mina1917 avatar mina1917 commented on June 26, 2024

"GET /DNTCaptchaImage/Show?data=Lq3czSmPZ4-ohUzc_YK2e61LhT3DNUM1gPIaQo1mN_qo6chFrNMUkntpxoaQDfs1eYkg1FidTeKByuqmL87OGw HTTP/1.1" 400 Bad Request

from dntcaptcha.core.

mina1917 avatar mina1917 commented on June 26, 2024

On my local and windows host, everthing works well but I've had problems on ubuntu linux and the image doesn't display properly

Error is : Couldn't deserialize the model.

from dntcaptcha.core.

VahidN avatar VahidN commented on June 26, 2024

Error is : Couldn't deserialize the model.

This means something is cutting/changing some parts of the query string and on the server, this corrupted data can't be decrypted properly. Do you have any filter here such as LowercaseQueryStrings = true?

from dntcaptcha.core.

mina1917 avatar mina1917 commented on June 26, 2024

I found this in my logs :

Failed to show the captcha image.
May 30 16:59:08 localhost netcore-demo[286782]: SixLabors.Fonts.FontFamilyNotFoundException: Tahoma could not be found
May 30 16:59:08 localhost netcore-demo[286782]: at SixLabors.Fonts.FontCollection.GetImpl(String name, CultureInfo culture)
May 30 16:59:08 localhost netcore-demo[286782]: at DNTCaptcha.Core.CaptchaImageProvider.getFont(String fontName, Single fontSize) in D:\Prog\1395\DNTCaptcha.Core\src\DNTCaptcha.Core\CaptchaImageProvider.cs:line 113
May 30 16:59:08 localhost netcore-demo[286782]: at DNTCaptcha.Core.CaptchaImageProvider.DrawCaptcha(String message, String foreColor, String backColor, Single fontSize, String fontName) in D:\Prog\1395\DNTCaptcha.Core\src\DNTCaptcha.Core\CaptchaImageProvider.cs:line 53
May 30 16:59:08 localhost netcore-demo[286782]: at DNTCaptcha.Core.DNTCaptchaImageController.Show(String data) in D:\Prog\1395\DNTCaptcha.Core\src\DNTCaptcha.Core\DNTCaptchaImageController.cs:line 191

from dntcaptcha.core.

VahidN avatar VahidN commented on June 26, 2024
  • The last version is not using the SixLabors anymore. It's SkiaSharp.
  • Tahoma font is not installed on Linux systems. You should define a custom font here.

from dntcaptcha.core.

mina1917 avatar mina1917 commented on June 26, 2024

I use this version Include="DNTCaptcha.Core" Version="4.3.3"
you mean if I use the last version, it will be fixed?

from dntcaptcha.core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.