Activities of "info@ericverschoor.nl"

  • ABP Framework version: v7.0.1
  • UI type: Blazor
  • DB provider: EF Core

When generating unittest for xxxAppServiceTests, the mocked string values can contain incorrect characters when using regex input validation.

note: the used regex is: [+-]?(\d*)(.)(\d+),(.?)[+-]?(\d*)(.)(\d+),(.?)[+-]?(\d*)(.)(\d+),(.?)[+-]?(\d*)(.)*(\d+) this will validate this bounding box: 48.040502, -1.657292, 56.110590, 12.431727

(please refund this ticked when you agree that this is an abp suite issue)

  • ABP Framework version: v7.0.1
  • UI type: Blazor
  • DB provider: EF Core

In ABP suite, when generating code for a float property with a default value, the default value is incorrect. A default float value must be suffixed with an 'f'.

not tested, but double and decimal should also be suffixed https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#real-literals

note: i'm not able to enter a char in the default value input. It must be a number.

(please refund this ticked)

can you please confirm that my ticked is refunded because this is report of an issue of the abp templates and not a question?

  • ABP Framework version: v7.0.1
  • UI type: Blazor
  • DB provider: EF Core

given a entity with plural name: mensen

when adding a entity fietesen with a 1-n navigation property to mensen

In EFFietsRepository.cs the code generator creates incorrect code dbContext.Menss instead of dbContext.Mensen

And also the Fietsen.razor and Fietsen.razor.cs files does not respect the given plural name (it is not incorrect code). however, the filenames are correct.

Yes, now it works. The StringEncryption was missing in the MyProject.Web.Public project appsettings.json. Can you refund this ticket?

To add to this case, when using the ContactViewComponent, when I fill in the contact form and send the message, the same exception happens.

2023-01-18 13:57:38.136 +01:00 [INF] Executing endpoint 'Volo.CmsKit.Public.Contact.ContactPublicController.SendMessageAsync (Volo.CmsKit.Pro.Public.HttpApi)'
2023-01-18 13:57:38.137 +01:00 [INF] Route matched with {area = "cms-kit-pro", action = "SendMessage", controller = "ContactPublic", page = ""}. Executing controller action with signature System.Threading.Tasks.Task SendMessageAsync(Volo.CmsKit.Public.Contact.ContactCreateInput) on controller Volo.CmsKit.Public.Contact.ContactPublicController (Volo.CmsKit.Pro.Public.HttpApi).
2023-01-18 13:57:38.496 +01:00 [ERR] Padding is invalid and cannot be removed.
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at System.Security.Cryptography.SymmetricPadding.GetPaddingLength(ReadOnlySpan`1 block, PaddingMode paddingMode, Int32 blockSize)
   at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(ReadOnlySpan`1 inputBuffer, Span`1 outputBuffer)
   at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.UniversalCryptoTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.ReadAsyncCore(Memory`1 buffer, CancellationToken cancellationToken, Boolean useAsync)
   at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Volo.Abp.Security.Encryption.StringEncryptionService.Decrypt(String cipherText, String passPhrase, Byte[] salt)
   at Volo.Abp.Settings.SettingEncryptionService.Decrypt(SettingDefinition settingDefinition, String encryptedValue)
2023-01-18 13:57:39.198 +01:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "Er is een interne fout opgetreden tijdens uw verzoek!",
  "details": null,
  "data": {},
  "validationErrors": null
}

2023-01-18 13:57:39.198 +01:00 [ERR] Setting value for 'Abp.Mailing.Smtp.Password' is null or empty!
Volo.Abp.AbpException: Setting value for 'Abp.Mailing.Smtp.Password' is null or empty!
   at Volo.Abp.Emailing.EmailSenderConfiguration.GetNotEmptySettingValueAsync(String name)
   at Volo.Abp.Emailing.Smtp.SmtpEmailSender.BuildClientAsync()
   at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail)
   at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize)
   at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml)
   at Volo.CmsKit.Contact.ContactEmailSender.SendAsync(String contactName, String name, String subject, String email, String message)
   at Volo.CmsKit.Public.Contact.ContactPublicAppService.SendMessageAsync(ContactCreateInput input)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
   at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Volo.CmsKit.Public.Contact.ContactPublicController.SendMessageAsync(ContactCreateInput input)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  • ABP Framework version: v7.0.0
  • UI type: Blazor Server
  • DB provider: EF Core
  • Tiered (MVC): no
  • Steps to reproduce the issue:
  1. Create a new solution using abp suite
  2. Add the 'subscribe to newsletter' widget to MyProject.Web.Public\Pages\index.cshtml
 @await Component.InvokeAsync(
    typeof(NewsletterViewComponent),
    new
    {
    preference = "Newsletter_Default",  //deze naam komt overeen met  ZichtOpGrond.Domain\ZichtOpGrondDomainModule.cs
    source = "Footer",
    requestAdditionalPreferencesLater = false
    })
  1. Start the application in release mode
  2. configure the SMTP server settings using the administrator > settings > email , and confirm that the mail can be sent. now the SMTP settings are persisted to the database.

Go to the web.public web page and subscribe to the news letter. It will fail with the message blow

And the logfile of the MyProject.Web.Public will contain the message/stacktrace

note: restarting the application and redis does make any difference

2023-01-18 11:40:10.021 +01:00 [INF] Request starting HTTP/2 POST https://localhost:44333/api/cms-kit-public/newsletter application/json 157
2023-01-18 11:40:10.040 +01:00 [INF] Executing endpoint 'Volo.CmsKit.Public.Newsletters.NewsletterRecordPublicController.CreateAsync (Volo.CmsKit.Pro.Public.HttpApi)'
2023-01-18 11:40:10.043 +01:00 [INF] Route matched with {area = "cms-kit-pro", action = "Create", controller = "NewsletterRecordPublic", page = ""}. Executing controller action with signature System.Threading.Tasks.Task CreateAsync(Volo.CmsKit.Public.Newsletters.CreateNewsletterRecordInput) on controller Volo.CmsKit.Public.Newsletters.NewsletterRecordPublicController (Volo.CmsKit.Pro.Public.HttpApi).
2023-01-18 11:40:10.698 +01:00 [ERR] Padding is invalid and cannot be removed.
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at System.Security.Cryptography.SymmetricPadding.GetPaddingLength(ReadOnlySpan`1 block, PaddingMode paddingMode, Int32 blockSize)
   at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(ReadOnlySpan`1 inputBuffer, Span`1 outputBuffer)
   at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.UniversalCryptoTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.ReadAsyncCore(Memory`1 buffer, CancellationToken cancellationToken, Boolean useAsync)
   at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Volo.Abp.Security.Encryption.StringEncryptionService.Decrypt(String cipherText, String passPhrase, Byte[] salt)
   at Volo.Abp.Settings.SettingEncryptionService.Decrypt(SettingDefinition settingDefinition, String encryptedValue)
2023-01-18 11:40:11.493 +01:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "An internal error occurred during your request!",
  "details": null,
  "data": {},
  "validationErrors": null
}

2023-01-18 11:40:11.494 +01:00 [ERR] Setting value for 'Abp.Mailing.Smtp.Password' is null or empty!
Volo.Abp.AbpException: Setting value for 'Abp.Mailing.Smtp.Password' is null or empty!
   at Volo.Abp.Emailing.EmailSenderConfiguration.GetNotEmptySettingValueAsync(String name)
   at Volo.Abp.Emailing.Smtp.SmtpEmailSender.BuildClientAsync()
   at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail)
   at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize)
   at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml)
   at Volo.CmsKit.Public.Newsletters.NewsletterRecordPublicAppService.tW2e9HRfJJ(String  , NewsletterEmailStatus  )
   at Volo.CmsKit.Public.Newsletters.NewsletterRecordPublicAppService.CreateAsync(CreateNewsletterRecordInput input)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
   at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

can you also refund this ticket?

  • ABP Framework version: v7.0.0
  • UI type: Blazor Server
  • DB provider: EF Core
  • Tiered (MVC): no
  • Steps to reproduce the issue:"
  1. Create a new solution using abp suite
  2. start the application

You'll notice that the page title of the Web.Public does not contains the project title, It is using the default name of the DefaultBrandingProvider 'MyApplication'.

Reason the MyProjectBrandingProvider is missing in the Web.Public project but it does exist in the Blazor project.

Solution Add a MyProjectBrandingProvider to **MyProject.Web.Public **

namespace MyProject.Web.Public;

[Dependency(ReplaceServices = true)]
public class MyProjectBrandingProvider : DefaultBrandingProvider
{
    public override string AppName => "MyProject";
}

Please fix this in the abp templates

Just as a reference to my future self and others.

In the appsetting.json of the Public.Web project, the value of the AuthServer.Authority did not match the url of the Blazor project after generating the solution using abp suite. Therefore, when clicking on 'Login' on the Public page there was no correct redirect to the Blazor project.

{
  "App": {
    "SelfUrl": "https://localhost:44333",
    "DisablePII": "false"
  },  
  .....
  "AuthServer": {
    "Authority": "https://localhost:44313",  <<< the url of the blazor server.
    "ClientId": "WhereIsMyCms_Web_Public",
    "ClientSecret": "1q2w3e*"
  }
}

and in production, the url settings in the Web.Public, Blazor and DbMigrator projects should match:

Web.Public appsettings.json

{
  "App": {
    "SelfUrl": "https://public.myproject.com", 
  },
  "AuthServer": {
    "Authority": "https://blazor.myproject.nl", 
    "ClientId": "MyProject_Web_Public",
    "ClientSecret": "my_big_secret" 
  }
}

Blazor appsettings.json

{
  "App": {
    "SelfUrl": "https://blazor.myproject.nl", 
    "RedirectAllowedUrls": "https://blazor.myproject.nl"
  }
}

DbMigrator appsettings.json

{  
  "OpenIddict": {
    "Applications": {
      "MyProject_Web_Public": {
        "ClientId": "MyProject_Web_Public",
        "ClientSecret": "my_big_secret",
        "RootUrl": "https://public.myproject.com"
      }
    }
  }
}

Additional note to the DbMigrator. When the DbMigrator is not set correctly, the redirection in production will fail. The log of the blazor server will mention:

Client validation failed because 'https://public.myproject.com/signin-oidc' was not a valid redirect_uri for MyProject_Web_Public.
The authorization request was rejected because the redirect_uri was invalid: 'https://public.myproject.com/signin-oidc'.

This can be fixed using the correct appsetting as shown above.

Showing 1 to 10 of 19 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11