Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ITWebTeam"

Hi,

You can see in the prior example we are throwing a test exception in the WebhookPublishProductFieldApprovedclass which throws this:

throw new System.Exception("test from background job");

It runs in the background. We want to handle any exception that are thrown in the background.

Below is the ProductFieldApprovedEventData class

public class ProductFieldApprovedEventData : WebhookEventData
    {
        public int ProductId { get; set; }
        public int ProductDetailId { get; set; }
    }
    
public class WebhookEventData : EventData
    {
        public SchemaTypeEnum SchemaType { get; set; }
    }

Thank you

Hi @ismcagdas and thank you for the reply.

In most cases we don't catch the exceptions, we rely on the framework to handle this for us. In the case of background jobs we are depending on the exceptions details getting logged to the Audit log. We are trying to add functionality to send a notification whenever an exception is thrown. However, we are not receiving any events through AbpHandledExceptionData for background jobs wo no notifications are being sent nor are they logged in the audit log. It works for everything else. Below is an example of the workflow.

Enqueueing event:

            // _backgroundJobManager is IBackgroundJobManager injected into an AppService's constructor.
            await _backgroundJobManager.EnqueueEventAsync(new ProductFieldApprovedEventData
            {
                // properties
            });

Handling event and throwing the exception inside:

    public class WebhookPublishProductFieldApproved : ISingletonDependency, IAsyncEventHandler<ProductFieldApprovedEventData>
    {
        // other dependencies
        public async Task HandleEventAsync(ProductFieldApprovedEventData eventData)
        {
            throw new System.Exception("test from background job"); // cannot catch this later using handlers
            // actual logic for this event's handling
        }
    }

Handling the exception event:

    public class ExceptionWebhookEventHandler : ISingletonDependency, IAsyncEventHandler<AbpHandledExceptionData>
    {
        // other dependencies
        public async Task HandleEventAsync(AbpHandledExceptionData eventData)
        {
            // handling logic using eventData.Exception
        }
    }

Turns out version 8.9.2 didn't encrypt the setting Abp.Zero.Ldap.Password and version 11.1 does. I wasn't getting the cryptography error until I enabled all exceptions. Removing the old value and entering it using the GUI solved the issue.

Hi @ismcagdas

It happens at startup, which prevents the app from starting. We get "HTTP Error 500.30 - ASP.NET Core app failed to start"

I took a fresh copy that I downloaded of AspNetZero v11.1 of our project and pointed it to the version 8.9.2 database. I ran migrations to update the DB schema. Finally I disabled multi tenancy and ran the application.

I was able to recreate the issue. So it doesnt like something in the Database, which is odd because we have multi tenancy disabled in the 8.9.2 version.

Do you have any idea what area of the DB we should start looking for the issue?

Thank you.

Done!

https://github.com/aspnetzero/aspnet-zero-core/issues/2935

Nevermind, this is a duplicate to the Add Migration issue

https://support.aspnetzero.com/QA/Questions/8253

We've identified that bower is having an issue within our company's proxy server getting a certificate. This is preventing the dependencies from being downloaded using bower.

bower blockUI#*UNABLE_TO_GET_ISSUER_CERT_LOCALLY Request to <a class="postlink" href="https://bower.herokuapp.com/packages/jquery.blockUI">https://bower.herokuapp.com/packages/jquery.blockUI</a> failed: unable to get local issuer certificate

We are looking into a resolution.

Showing 1 to 7 of 7 entries