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

Activities of "maharatha"

We are using Angular and .Net core latest version.

We are using Okta as our Login Provider for OpenID connect and we are able to successfully use it as well.

When the authentication is complete we get redirected to the Login page, and the login page is displayed for 2-3 seconds to the user before it logins to the system. This is creating confusion as people are thinking nothing happened let me try again.

How do we block the UI while the authentication is being verified in the back ground.

We tried adding start and stop spinner at NgInit level and that didn't help.

We also added here :  
 externalLogin(provider: ExternalLoginProvider) {
        this.showMainSpinner();
        if (this.loginService.authenticateModel.userNameOrEmailAddress) {
            this.loginService.externalAuthenticate(provider);
        }
        this.hideMainSpinner();
    }

Please help us to block the UI before the user is able to login to the application

Question

Currently we are using the latest version of AspnetZero Angular version.

I enable time zones functionality in my application by adding following line of code to ONEWebCoreModule.cs

Clock.Provider = ClockProviders.Utc;

After adding the above line of code when I select any date in a calendar control inside my application, it picks the previous day's date. For example if I select 11/20/2023 on calendar it will show 11/19/2023.

Do we know whats going on here ?

We are using latest version of Angular and .NET Core. I have a question on how to handle the user friendly exception.

In the API when we throw user friendly exception the message is being displayed using Sweet Alert. However we want to change that behavior and handle displaying the error message on our own.

We still want to wrap the rsult but handle the error on our side.

I read the article where it says "You may want to disable displaying the message for a particular AJAX call. If so, add abpHandleError: false into the abp.ajax options.". I am not sure how to send this option as all requests are being handled by the service proxies

We use the latest version of Angular and .NET Core.

We have a requirement where is we have to display the number of users and number of users in each role for each tenant in the Tenant List. This could be an expensive operation, so we want to add this column to existing Tenant Grid however asynchronously load these columns.

Could you recommend some good approach on how to do it ?

I am using the latest version of AspnetZero Angular & Core.

We are trying implement resiliency pattern Poly as suggested by Microsoft in the below article https://learn.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly

Everything works as normal however we are having issue with logging. We want to use Abp Logger to log any retries.

Below is the sample code . If you look at the comment we want to use Abp Logger, but this code is in the start up class. So any ideas how we can use Abp Logger. The idea is to log any retry that happens for future record keeping

services.AddHttpClient<XYZManager>(httpClient =>
            {
                httpClient.BaseAddress = new Uri(_appConfiguration["URL"]);
                httpClient.DefaultRequestHeaders.Add("User-Agent", XYZ");
                httpClient.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("application/json"));
                httpClient.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache");
            })
                .AddHttpMessageHandler<AuthenticationDelegationAHandler>()
                .SetHandlerLifetime(TimeSpan.FromMinutes(5))  //Set lifetime to five minutes
                .AddPolicyHandler(GetRetryPolicy())
                
static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy(int medianFirstRetryDelay = 35, int retryCount = 7)
        {
           
          
            var delay = Backoff.DecorrelatedJitterBackoffV2(medianFirstRetryDelay: TimeSpan.FromMilliseconds(medianFirstRetryDelay), retryCount: retryCount);

            //Add OnTryAsync to see when the policy is executed

            
            // return HttpPolicyExtensions along with retry logger
            return HttpPolicyExtensions
                .HandleTransientHttpError()
                .OrResult(msg => msg.StatusCode == System.Net.HttpStatusCode.NotFound)
                .WaitAndRetryAsync(delay, (result, timeSpan, retryCount, context) =>
                {
                    // this is your new callback
                    // do whatever logging you want here
                    // you probably want to log the url and the response
                    // as well as the exception that was thrown
                    // but we'll leave that to you
                    Console.WriteLine($"Retry {retryCount} after {timeSpan.TotalMilliseconds}ms delay due to {result.Exception?.Message}");
                  

                    // Use Abp Logger to log the exception
                   
                  
                   
                    
                });


        }

We currently are working on the latest version of AspnetZero Angular and .Net Core. We are trying to use GCPDFViewer and this is where we are stuck : https://www.grapecity.com/documents-api-pdf/docs/online/configure-pdf-editor.html Look at the Step 10 and you will find the code :

We are trying to create the controller however we also want to inheirt the Abp Controller. As c# doesn't allow multiple inheritance, I am trying to figure out a reasonable solution on how can i achieve this.

Any guidance is appreciated


 using GrapeCity.Documents.Pdf.ViewerSupportApi.Controllers;
 
namespace WebApplication1_WebForms.Controllers
{
    public class SupportApiController : GcPdfViewerController
    {
 
    }}     ```                                                                                                                                                    

I was able to integrate Elsa into my Angular and the .Net Core Application. I am using the latest version.

I am trying to understand how can I protect Elsa Endpoints like //Hello-World by using AbpAuthorize data annotation.

I basically want an documentid to be posted to an endpoint which will trigger the flow, however only Authorized user can hit this end point. So how to implement it.

Hi All -

We need to have a proper documentation for Elsawith .Net Core and Angular projects. I have tried multiple times following the MVC project integration but have failed many times.

I request to provide some documentation around .Net Core and Angular project

I have added an OrganizationId ForeignKey to the tenant table.

I am now getting the list of Organization for the user

var organizationList = await UserManager.GetOrganizationUnitsAsync(await UserManager.GetUserByIdAsync(AbpSession.UserId.Value));

var query = TenantManager.Tenants
                .Include(t => t.Edition)
                .Include(t =>t.OrganizationUnit)
                .WhereIf(!input.Filter.IsNullOrWhiteSpace(), t => t.Name.Contains(input.Filter) || t.TenancyName.Contains(input.Filter))
                .WhereIf(input.CreationDateStart.HasValue, t => t.CreationTime >= input.CreationDateStart.Value)
                .WhereIf(input.CreationDateEnd.HasValue, t => t.CreationTime <= input.CreationDateEnd.Value)
                .WhereIf(input.SubscriptionEndDateStart.HasValue, t => t.SubscriptionEndDateUtc >= input.SubscriptionEndDateStart.Value.ToUniversalTime())
                .WhereIf(input.SubscriptionEndDateEnd.HasValue, t => t.SubscriptionEndDateUtc <= input.SubscriptionEndDateEnd.Value.ToUniversalTime())
                .WhereIf(input.EditionIdSpecified, t => t.EditionId == input.EditionId);

How do I filter by OrganizationList here ?

I am using the latest version of Aspnet Zero (Angular+.NET Core).

I will be using Okta as my SSO , so when I am sending an invite to the user I want to send the tenancyname or tenantid in the query string. So when complete registration and land back on the login page with Tenancy name or Tenantid on the query string i want to grab that and be able to select the Tenant automatically.

Showing 1 to 10 of 120 entries