Starts in:
1 DAY
16 HRS
39 MIN
8 SEC
Starts in:
1 D
16 H
39 M
8 S
Open Closed

After Upgrading to ABP Version5 and dotnet6, 1/ dntcaptcha not working on the existing Abp Project and 2/ Unable to find package Volo.Abp.EntityFrameworkCore.Oracle with version (>=5.0.0) #2298


User avatar
0
piseth created
  • ABP Framework version: v5
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

31 Answer(s)
  • User Avatar
    0
    piseth created

    By the way, I have to customize Login page. I am trying to follow this tutorial: https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd

    how can i validate DNTCaptcha in the Login page? Please help

  • User Avatar
    0
    piseth created

    public class CustomLoginModel : LoginModel {

        private readonly IDNTCaptchaValidatorService _validatorService;
        private readonly DNTCaptchaOptions _captchaOptions;
    
        public CustomLoginModel(
            Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemeProvider,
            IOptions<Volo.Abp.Account.Public.Web.AbpAccountOptions> accountOptions,
            IAbpRecaptchaValidatorFactory abpRecaptchaValidatorFactory,
            IAccountExternalProviderAppService accountExternalProviderAppService,
            ICurrentPrincipalAccessor currentPrincipalAccessor,
            IOptions<IdentityOptions> identityOptions,
            IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions,
            IDNTCaptchaValidatorService validatorService,
            IOptions<DNTCaptchaOptions> options
            )
            : base(schemeProvider: schemeProvider,
                  accountOptions: accountOptions,
                  recaptchaValidatorFactory: abpRecaptchaValidatorFactory,
                  accountExternalProviderAppService: accountExternalProviderAppService,
                  currentPrincipalAccessor: currentPrincipalAccessor,
                  identityOptions: identityOptions,
                  reCaptchaOptions: reCaptchaOptions
                  )
        {
            _validatorService = validatorService;
            _captchaOptions = options == null ? throw new ArgumentNullException(nameof(options)) : options.Value;
        }
    
        public override async Task<IActionResult> OnPostAsync(string action)
        {
             1/ I want to implement default Abp's implementation
             2/ Want extra checking DNT Captcha whether it is correct or not
             if correct => success login and go to Homepage
             else => not success login 
        }
    
    
        
    
    }
    
  • User Avatar
    0
    piseth created

    Hello, I really don't know what is the difference between Abp new version with dotent 6 and the old version. I know it is not the problem with your Abp. I may need your help. My old Abo (version 4.3.3) with dotnet 5 is working normally with DNTCaptcha. **Without having to write any C# code in CustomLogin.cs, i just add the following codes in Login.cshtml and it works with the help of validating the provided captcha code for me:

    <abp-script src="/libs/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js" /> <abp-script src="/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js" /> <abp-script src="/libs/jquery-validation/jquery.validate.js" /> <abp-script src="/libs/jquery/jquery.js" />

    <dnt-captcha asp-captcha-generator-max="999999" asp-captcha-generator-min="111111" asp-captcha-generator-language="English" asp-captcha-generator-display-mode="ShowDigits" asp-use-relative-urls="true" asp-placeholder="Enter Security code" asp-validation-error-message="Please enter the security code." asp-font-name="Tahoma" asp-font-size="20" asp-fore-color="#333333" asp-back-color="#ccc" asp-text-box-class="text-box form-control" asp-text-box-template="<div class='input-group'><span class='input-group-prepend'><span class='input-group-text'><i class='fas fa-lock'></i></span></span>{0}</div>" asp-validation-message-class="text-danger" asp-refresh-button-class="fas fa-redo btn-sm" />**

    It is strange with the new version. It seems jquery.validate.unobtrusive.js jquery.validate.js not validating for me

  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    You may be using the version of DNTCapcha that does not support dotnet v6.0 version.

    Can you check?

    If you are using the dotnet v6.0 version of DNTCapcha that supports dotnet v6.0 and you are still getting errors, please provide the relevant log record and code examples so that I can reproduce the error.

  • User Avatar
    0
    piseth created

    I already use the latest version. I don't know what is the matter with it.

    Now i manage to solve it by customize Login page, and i write extra code by override OnPostAsync(string action)

    if (!_validatorService.HasRequestValidCaptchaEntry(Language.English, DisplayMode.ShowDigits)) { Alerts.Danger("Please Enter Valid Captcha."); }

    Please recommend if it not a good practice to override OnPostAsync(string action) of Login.cshtml.cs

  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Glad it worked. There is nothing wrong with overriding anywhere for your own needs. You don't need to worry about this.

    I am closing the issue. Feel free to re-open or create a new issue if you have further questions.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06