Activities of "alin.berce"

Thank you for your answer and link.

I think it's related to abp because when using the template with a public web site, abp uses redis. Would configuring sql server caching for an abp project break abp functionality that relates on redis? The idea is to not use redis at all in the solution.

Hi,

Can Sql server cache be used instead of redis is the database is also on Sql server? Any drawbacks? Any advices on how to implement Sql server caching?

Thank you for your time.

Thank you for your explanation.

I see in the abp docs that there is a mention that by default it uses memory cache. If both the public web and web are on the same server (web on a subfolder), shouldn't caching still be working using memory cache and no need for redis in this case?

Thank you for your time.

Related to redis, if both the Web and Web.Public are on the same server, should there be performance issues for small projects? I know that on older abp versions redis could have been disabled, but on newer ones, starting with abp 6.0 I think, is required even on local machine development. So, can it be disabled on abp 6+ completely for small projects?

Secondly, let me see if I get this right

  • first use dotnet command to generate the certificate
  • copy the generated file on the application directory (any particular place to copy it?)
  • use the file from GetSigningCertificate This should make it work without the need to add the self signed certificates to azure/iis correct?

Basically this doesn't answer any of my questions.

What would happen without redis specifically? Some settings not being updated to public? Any other performance related issues? Because from experience, with redis things can get worse in some cases if the redis server is not on the same hosting.

Identity Server has been replaced with Openididict which instad of making things easier it makes things more dificult when publishing on other hosts than Azure. What happens on IIS where there's no access to install certs on machine? Are you saying that one can configure application pool to load a user profile and use AddDevelopmentEncryptionAndSigningCertificate in production?

So at this point beside abp running one needs to have Redis available, needs to have access to add self signed certificates and this mostly translates into the need of using Azure. But what if you have a small project? What if you don't want to use Azure?

I have two questions that I'd like some clarification.

  1. When using the default template (not tiered) but with a public web site, how can I disable Redis? What is the impact of not having Redis for small projects in this case?

  2. As stated here on abp support and in the link provided https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html the requirement for production is to generate and register certificates. While the certificates can be pretty easily added on Azure, what happens when the apps are hosted on IIS? There it says that it recommends to store the certificate on the machine's store however, not all hosting services provide this kind of access or option to do this. Is there a simpler way to have the openIdDict working without these certificates? Previously when using IdentityServer things were simpler.

@enisn any solution for my issue?

@enisn any idea what to try?

I've had some commented out DependsOn in Domain project from my trials and errors and because of that, even with the appsettings.json configured it wasn't working. Now I can perform a stripe test payment and return back to callback URL.

However, one last small bit that I am missing

Looking at the docs, it says that

Volo.Payment.PaymentRequestCompleted (PaymentRequestCompletedEto): Published when a payment is completed.

My desire is to update something in the database when the event is handled. Here is some sample code

public class MyTestEventHandler : IDistributedEventHandler<PaymentRequestCompletedEto>, ITransientDependency
{
        private readonly IMyTestRepository myTestRepository;
       
        public PaymentRequestCompletedEventHandler(IMyTestRepository myTestRepository;)
        {
            this.myTestRepository = myTestRepository;
        }

        public async Task HandleEventAsync(PaymentRequestCompletedEto eventData)
        {
            Guid id = Guid.Parse(eventData.Products[0].Code); //the Code is entity Id

            var entity = await myTestRepository.GetAsync(id);
            
           //here at fetching data from the repository it throws error
        }
}

My repository is injected fine. the Id received exists in the database, however it throws error.

The error I get is: Message: A task was cancelled Source: Microsoft.EntityFrameworkCore.Relational InnerException: null

Digging a bit deeper into debug console I can see: An error occured using the connection to database 'MyProj' on server 'MyLocalServer'

A task was cancelled. at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)...

Feels like there's no context for the event handler. How can I property handle the ETO while having access to the database?

@enisn thank you for your answer. If I do it in the Post indeed is does not throw the same error. However, now it says:

ApplicationException: No payment gateway configured!

    Volo.Payment.Pages.Payment.GatewaySelectionModel.OnPostAsync()

In the docs it says:

PaymentOptions is used to store list of payment gateways. You don't have to configure this manually for existing payment gateways. You can, however, add a new gateway like below;

also

Instead of configuring options in your module class, you can configure it in your appsettings.json file like below;

What's missing from my configuration? You can see above that in appsettings.json there's an entry for Payment containing only Stripe because that's the only thing I want to use. Also the PublicWebModule has [DependsOn(typeof(AbpPaymentStripeWebModule))] and [DependsOn(typeof(AbpPaymentWebModule))]

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