Activities of "mgurer"

Well my problem was about not being able to debug the validation process. But your suggestion gave me a hint. I added following line to my validator and problem solved.

public override string FormatErrorMessage(string name)
{
    return string.Format(PspResource.RequiredAttribute_ValidationError, name);
}    

Thanks.

Hello, I have created a custom data annotition attribute. Below is the code;

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter,
    AllowMultiple = false)]
public class PspRequiredAttribute : RequiredAttribute
{
    public PspRequiredAttribute()
    {
        ErrorMessageResourceName = nameof(PspResource.RequiredAttribute_ValidationError);
        ErrorMessageResourceType = typeof(PspResource);
    }
}

Here is a sample create dto for testing;

public class ProductCreateDto
{
    [PspRequired]
    [PspStringLength(ProductConsts.NameMaxLength)]
    [Display(Name = "Product_Name", ResourceType = typeof(ProductServiceResource))]
    public string Name { get; set; }
}

On blazor pages, after applying new PspRequired attribute, blazor forms automatically gets localized for validation messages. Otherwise, using classic Required attribute, blazor ui localizations fails, and only english localizations are shown for models ui validation messages.

But when I send this dto to create method of service, I get an error of this type: System.InvalidOperationException, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e

When I use standard Required attribute, no error occcurs.

I placed breakpoints on conrollers create action but no breakpoint hits but error is returned. I can not figure out what is going on because no breakpoint hits.

How can I use my own anotation attributes as in the example.

Tnx Murat

  • ABP Framework version: v9.0.0
  • UI Type: Blazor Server
  • Database System: EF Core (PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello.

I have just updated my code base to use couchbase as distributed cache and lock provider.

Everything goes fine.

During my tests, I have noticed a behavior about distributed locks for BackgroundJobWorker.

The class implementation uses constant "AbpBackgroundJobWorker" string as lock key.

I have maybe 50 microservices and each microservice has their own database and each database has own "AbpBackgroundJobs" table.

Each microservice runs this BackgroundJobWorker periodically (a bit often) and on every call the lock is activated using same lock key ("AbpBackgroundJobWorker"). I use Volo.Abp.BackgroundJobs.EntityFrameworkCore library to store job queue on database.

Since microservices has their own separate databases, blocking microservices with same lock-key seems to me a little bit inefficient. This blockage goes up depending on the number of microservices.

I suggest appending the database name as a suffix to the lock key or add an option to set this key separately for each microservice so that microservices do not block each other.

I would like to alter this implementation according to my suggestion, but I like to ensure that I do not miss any logic that made you use same lock-key.

Do you have any comment about this issue?

Thanks. Murat

I also want to add this line; if I knew that polymorhism is blocked by Abp’s design choice, I would never, ever start using abp. I wish I knew at the beginning. I was actively advocating the framework to my network for their sake of good, now I understand that I mistakenly lead them to into a nightmare. Sorry for them. My bad.

Hi again. I don’t prefer to implement two seperate implementations and controllers. This really makes no sense. You take serious amount of power off from our hands with this limitation. What is left in the language if you exclude the inheritence and polimorphism. Too disappointed.

Thanks anyway

  • ABP Framework version: v8.3.1
  • UI Type: Blazor Server
  • Database System: EF Core (PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello

I am experiencing a strange behaviour when using abp generate-proxy cli command.

Below there is a few lines of codes;

//towns service contract public interface ITownsAppService : ICrudAppService<TownDto, Guid, GetTownsInput, TownCreateDto, TownUpdateDto>, ILookupService { }

//my lookup service interface public interface ILookupService { Task<PagedResultDto<LookupDto<Guid>>> GetListAsLookupAsync(LookupRequestDto input); }

//towns service implementation public class TownsAppService : CrudAppService<Town, TownDto, Guid, GetTownsInput, TownCreateDto, TownUpdateDto>, ITownsAppService {...}

//towns service controller [RemoteService(Name = MasterServiceRemoteServiceConsts.RemoteServiceName)] [Area("master-service")] [ControllerName("Town API")] [ApiVersion("1.0")] [Route("api/master-service/towns")] public class TownController : AbpController, ITownsAppService {...}

when i run the following command; abp generate-proxy -t csharp -u https://localhost:xxx/ -m master-service --without-contracts

Proxy codes are generated for ILookupsService not for ITownsAppService, as you can see my controller and my service implemtation inherits ITownsAppService directly and ILookupService indirectly.

[Dependency(ReplaceServices = true)] [ExposeServices(typeof(ILookupService), typeof(TownClientProxy))] public partial class TownClientProxy : ClientProxyBase<ILookupService>, ILookupService

So when i try to access ITownsAppService, i got interface not implemented error as you can figure out.

If I rename ILookupService to ILookupAdaptor, proxy generation skips to generate proxy files for towns. No output created.

Is there a way to fix this issue?

Murat Gürer

Hi. Thanks for your support. 👍

I tested code and it does its job as expected.

I have further questions about the topic;

1 - I am curious about the unexpected side effects of this workaround. Is there any?

2 - Should I suspect about other entities for this issue?

3 - Is this buggy behavior efcore-wise problem or is it specific to OpenIddictApplication entity?

Thanks

Sent

Is that postgres db that you select as dbms? I suspect about some wierd behaviour on timestamped columns.

I can provide a sample proj that I genererated recently.

Showing 1 to 10 of 72 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13