Activities of "priyankasynapxe"

below is the error log https://abp.io/support/questions/8635/Bad-Request---Request-Too-Long#answer-3a1775dc-aad6-8d64-4a56-5a23a2169434

I didn't see any error message there.

BTW,will it work if you try this

Configure<IISServerOptions>(options => 
{ 
    options.MaxRequestBodySize = 209715200; 
}); 
 
Configure<KestrelServerOptions>(options => 
{ 
    options.Limits.MaxRequestBodySize = 209715200; 
}); 

yes, error is not there but still I'm getting bad request.

I tried below code, it's not working, I'm still getting bad request.

Configure<IISServerOptions>(options =>

{ options.MaxRequestBodySize = 209715200; });

Hi,

You can try this, and put a breakpoint to debug

options.Events.OnTicketReceived += receivedContext => 
{ 
    //Remove unnecessary claims 
    receivedContext.Principal!.RemoveClaims("..."); 
    return Task.CompletedTask; 
}; 

In my token I can see below claims

"iss": "exp": "iat": "aud": "sub": "oi_au_id": "preferred_username": "azp": "at_hash": "oi_tkn_id":

also, I have manually added given_name, permissionClaim, and concurrentUserId, I believe I cannot delete these, am I supposed to delete other JWTClaims even if it is not in token?

Hi,

There are too many cookies. This is an external login mechanism that stores all data in cookies.

You can try using OnTicketReceived to delete unnecessary claims to reduce cookie size.

.AddOpenIdConnect(...., 
options => 
{ 
    options.Events.OnTicketReceived += .... 
}); 

Can you share the sample code file, also I have added few claims which is required, is it possible to delete pre-defined claims?

below is the error log

2025-01-14 15:10:35.991 +08:00 [INF] Request starting HTTP/1.1 GET https://app02/UAT/eFCApp/Account/BTViewEncounter?MRN=XXXXXXXX&ENo=XXXXXXXXXXX01 - null null 2025-01-14 15:10:35.995 +08:00 [INF] Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user. 2025-01-14 15:10:35.995 +08:00 [INF] AuthenticationScheme: Identity.Application was challenged. 2025-01-14 15:10:35.995 +08:00 [INF] Request finished HTTP/1.1 GET https://app02/UAT/eFCApp/Account/BTViewEncounter?MRN=XXXXXXXX&ENO=XXXXXXXXXXX01 - 302 null null 4.7929ms 2025-01-14 15:10:36.008 +08:00 [INF] Request starting HTTP/1.1 GET https://app02/UAT/eFCApp/Account/Login?ReturnUrl=%2FUAT%2FeFCApp%2FAccount%2FBTViewEncounter%3FMRN%XXXXXXXX%26ENO%XXXXXXXXXXX01 - null null 2025-01-14 15:10:36.019 +08:00 [INF] Executing endpoint '/Account/Login' 2025-01-14 15:10:36.020 +08:00 [INF] Route matched with {page = "/Account/Login", action = "", controller = "", area = ""}. Executing page /Account/Login 2025-01-14 15:10:36.020 +08:00 [INF] [!dt trace_id=630191ab8549ef29494afe553a3167fd,span_id=d0933559fd000000,trace_sampled=true] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2025-01-14 15:10:36.030 +08:00 [INF] Executing handler method eFC.Web.Pages.Account.LoginCustomModel.OnGetAsync - ModelState is "Valid" 2025-01-14 15:10:36.031 +08:00 [INF] [!dt trace_id=630191ab8549ef29494afe553a3167fd,span_id=70818beb68020000,trace_sampled=true] Return URL:/UAT/eFCApp/Account/BTViewEncounter?MRN=XXXXXXXX&ENo=XXXXXXXXXXX01 2025-01-14 15:10:36.031 +08:00 [INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.ChallengeResult. 2025-01-14 15:10:36.031 +08:00 [INF] Executing ChallengeResult with authentication schemes (["ADFS"]). 2025-01-14 15:10:36.032 +08:00 [INF] AuthenticationScheme: ADFS was challenged. 2025-01-14 15:10:36.032 +08:00 [INF] Executed page /Account/Login in 12.0754ms 2025-01-14 15:10:36.032 +08:00 [INF] Executed endpoint '/Account/Login' 2025-01-14 15:10:36.033 +08:00 [INF] Request finished HTTP/1.1 GET https://app02/UAT/eFCApp/Account/Login?ReturnUrl=%2FUAT%2FeFCApp%2FAccount%2FBTViewEncounter%3FMRN%XXXXXXXX%26ENo%XXXXXXXXXXX01 - 302 null null 24.9095ms 2025-01-14 15:10:42.567 +08:00 [INF] Request starting HTTP/1.1 POST https://app02/UAT/eFCApp/signin-oidc - application/x-www-form-urlencoded 1072 2025-01-14 15:10:42.568 +08:00 [INF] CORS policy execution successful. 2025-01-14 15:10:42.595 +08:00 [INF] AuthenticationScheme: Identity.External signed in. 2025-01-14 15:10:42.596 +08:00 [INF] Request finished HTTP/1.1 POST https://app02/UAT/eFCApp/signin-oidc - 302 null null 29.1642ms

It looks like the request is carrying too many cookies or other information, you can try to change the webconfig

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
  <system.web> 
    <!-- Increase max request length in KB --> 
    <httpRuntime maxRequestLength="51200" /> <!-- 50 MB --> 
  </system.web> 
   
  <system.webServer> 
    <security> 
      <requestFiltering> 
        <!-- Increase max content length in bytes --> 
        <requestLimits maxAllowedContentLength="52428800" /> <!-- 50 MB --> 
      </requestFiltering> 
    </security> 
  </system.webServer> 
</configuration> 

Thank you for the response, I have updated this but I'm still getting the same error. I can see below cookies (attached image) in normal case I see only first 3

Answer

Yes, the entity has the ConcurrencyStamp , so there will be an AbpDbConcurrencyException.

see https://learn.microsoft.com/en-us/ef/core/saving/concurrency?tabs=data-annotations

ok, thank you. will try.

Answer

hi

You can try to catch the exception and ignore or retry.

private async Task<bool> UpdateFCStatus(IList<long> encounterIds, long fcId, long fcModeId,int completedCount = 0, draftCount = 0, exemptedCount = 0) 
{ 
    try 
    { 
        using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: UnitOfWorkManager.Current?.Options.IsTransactional ?? false)) 
        { 
            // your code 
            await uow.CompleteAsync(); 
        } 
    } 
    catch (AbpDbConcurrencyException e) 
    { 
        /// 
    } 
} 

this will not prevent concurrency issue but it's just if concurrency issue comes it will retry, is my understanding correct?

Answer

hi

The EncounterMovementPlaceholder inherit fromFullAuditedAggregateRoot and AggregateRoot

So, your entity has a ConcurrencyStamp property.

https://github.com/abpframework/abp/blob/rel-9.0/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/AggregateRoot.cs#L18

Can you share the code that caused the exception?

below is the function where I'm updating this table and getting exception

private async Task<bool> UpdateFCStatus(IList<long> encounterIds, long fcId, long fcModeId,int completedCount = 0, draftCount = 0, exemptedCount = 0)
{
    foreach (long encounterRelation in encounterIds)
    {
        List<FinancialCounseling> fcList = await _financialCounselingRepository.GetEncounterFCRealtionAsync(encounterRelation);
             
        string fcStatus = string.Format("Completed({0}),Draft({1}),Exempted({2})", completedCount.ToString(), draftCount.ToString(), exemptedCount.ToString());

        var encounterData = await _encounterRepository.GetAsync(encounterRelation);
        encounterData.FCStatus = fcStatus;
        await _encounterRepository.UpdateAsync(encounterData);

        //Updating encounter status in Encounter placeholder table
        **var encounterPlaceHolderData = await _encounterMovementPlaceholderRepository.GetEncounterMovementPlaceholderByEncounterIdAsync(encounterRelation);
        if (encounterPlaceHolderData != null)
        {
            encounterPlaceHolderData.FCStatus = fcStatus;
            await _encounterMovementPlaceholderRepository.UpdateAsync(encounterPlaceHolderData);
        }**
    }
    return true;
}
Answer

can you share your entity class code?

This is my class where I'm getting error

using eFC.Patients; using eFC.CodeLookUps; using System; using System.Linq; using System.Collections.Generic; using System.Collections.ObjectModel; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; using JetBrains.Annotations;

using Volo.Abp;

namespace eFC.EncounterMovementPlaceholders { public class EncounterMovementPlaceholder : FullAuditedAggregateRoot<long> { [NotNull] public virtual string IdentificationText { get; set; }

    [CanBeNull]
    public virtual long? InstitutionId { get; set; }

    [CanBeNull]
    public virtual DateTime? AdmissionDate { get; set; }

    [CanBeNull]
    public virtual DateTime? DischargedDate { get; set; }

    [CanBeNull]
    public virtual string InstitutionCode { get; set; }

    [CanBeNull]
    public virtual string MsgType { get; set; }

    [CanBeNull]
    public virtual string HAR { get; set; }

    [CanBeNull]
    public virtual string CIPInd { get; set; }

    [CanBeNull]
    public virtual string ReferralHospital { get; set; }

    [CanBeNull]
    public virtual string ReferralType { get; set; }

    [CanBeNull]
    public virtual string VIPInd { get; set; }

    [CanBeNull]
    public virtual string VVIPInd { get; set; }

    [CanBeNull]
    public virtual string OpReferralHospital { get; set; }

    [CanBeNull]
    public virtual string OpReferralType { get; set; }

    [CanBeNull]
    public virtual string FCStatus { get; set; }

    [CanBeNull]
    public virtual string AccountStatus { get; set; }

    [CanBeNull]
    public virtual string OpVisitTypeDescription { get; set; }

    [CanBeNull]
    public virtual string OpVisitType_Code { get; set; }

    [CanBeNull]
    public virtual string Accident_Code { get; set; }

    [CanBeNull]
    public virtual string Accomodation_Code { get; set; }

    [CanBeNull]
    public virtual string AdmissionType_Code { get; set; }

    [CanBeNull]
    public virtual string ApptCat_Code { get; set; }

    [CanBeNull]
    public virtual string LevelOfCare_Code { get; set; }
    [CanBeNull]
    public virtual long ?OpVisitTypeID { get; set; }

    [CanBeNull]
    public virtual string PointOfCare_Code { get; set; }

    [CanBeNull]
    public virtual string Specialty_Code { get; set; }

    [CanBeNull]
    public virtual string SubDocType_Code { get; set; }

    [CanBeNull]
    public virtual string InstitutionType { get; set; }

    [CanBeNull]
    public virtual string DischargeLocation { get; set; }

    public virtual long? EncounterId { get; set; }

    [CanBeNull]
    public virtual string PendingEventId { get; set; }

    [CanBeNull]
    public virtual string PendingRecordId { get; set; }
    public long? PatientId { get; set; }
    public long? AccomodationCode { get; set; }
    public long? AdmissionTypeId { get; set; }
    public long? LevelOfcareId { get; set; }
    public long? SubDocType { get; set; }
    public long? SpecialtyId { get; set; }
    public long? ExternalSourceId { get; set; }
    public long? Status { get; set; }
    public long? AccidentCode { get; set; }
    public long? AccomodationCodeReason { get; set; }
    public long? ApptCatCode { get; set; }
    public long? DischargeDisposition { get; set; }
    public long? LateDischargeReason { get; set; }
    public long? PointOfCare { get; set; }
    public long? TransferReason { get; set; }
    public long? VisitType { get; set; }
    public long? ResidentialStatus { get; set; }

    public EncounterMovementPlaceholder()
    {

    }

    public EncounterMovementPlaceholder(long? patientId, long? accomodationCode, long? admissionTypeId, long? levelOfcareId, long? subDocType, long? specialtyId, long? externalSourceId, long? status, long? accidentCode, long? accomodationCodeReason, long? apptCatCode, long? dischargeDisposition, long? lateDischargeReason, long? pointOfCare, long? transferReason, long? visitType, long? residentialStatus, string identificationText, long institutionId, DateTime admissionDate, DateTime dischargedDate, long opVisitTypeID, string institutionCode = null, string msgType = null, string hAR = null, string cIPInd = null, string referralHospital = null, string referralType = null, string vIPInd = null, string vVIPInd = null, string opReferralHospital = null, string opReferralType = null, string fCStatus = null, string accountStatus = null, string opVisitTypeDescription = null, string opVisitType_Code = null, string accident_Code = null, string accomodation_Code = null, string admissionType_Code = null, string apptCat_Code = null, string levelOfCare_Code = null, string pointOfCare_Code = null, string specialty_Code = null, string subDocType_Code = null, string institutionType = null, string dischargeLocation = null, long? encounterId = null, string pendingEventId = null, string pendingRecordId = null)
    {

        Check.NotNull(identificationText, nameof(identificationText));
        Check.Length(identificationText, nameof(identificationText), EncounterMovementPlaceholderConsts.IdentificationTextMaxLength, EncounterMovementPlaceholderConsts.IdentificationTextMinLength);
        Check.Length(msgType, nameof(msgType), EncounterMovementPlaceholderConsts.MsgTypeMaxLength, 0);
        Check.Length(hAR, nameof(hAR), EncounterMovementPlaceholderConsts.HARMaxLength, 0);
        Check.Length(cIPInd, nameof(cIPInd), EncounterMovementPlaceholderConsts.CIPIndMaxLength, 0);
        Check.Length(referralHospital, nameof(referralHospital), EncounterMovementPlaceholderConsts.ReferralHospitalMaxLength, 0);
        Check.Length(referralType, nameof(referralType), EncounterMovementPlaceholderConsts.ReferralTypeMaxLength, 0);
        Check.Length(vIPInd, nameof(vIPInd), EncounterMovementPlaceholderConsts.VIPIndMaxLength, 0);
        Check.Length(vVIPInd, nameof(vVIPInd), EncounterMovementPlaceholderConsts.VVIPIndMaxLength, 0);
        Check.Length(opReferralHospital, nameof(opReferralHospital), EncounterMovementPlaceholderConsts.OpReferralHospitalMaxLength, 0);
        Check.Length(opReferralType, nameof(opReferralType), EncounterMovementPlaceholderConsts.OpReferralTypeMaxLength, 0);
        Check.Length(fCStatus, nameof(fCStatus), EncounterMovementPlaceholderConsts.FCStatusMaxLength, 0);
        Check.Length(accountStatus, nameof(accountStatus), EncounterMovementPlaceholderConsts.AccountStatusMaxLength, 0);
        Check.Length(opVisitTypeDescription, nameof(opVisitTypeDescription), EncounterMovementPlaceholderConsts.OpVisitTypeDescriptionMaxLength, 0);
        Check.Length(opVisitType_Code, nameof(opVisitType_Code), EncounterMovementPlaceholderConsts.OpVisitType_CodeMaxLength, 0);
        Check.Length(accident_Code, nameof(accident_Code), EncounterMovementPlaceholderConsts.Accident_CodeMaxLength, 0);
        Check.Length(accomodation_Code, nameof(accomodation_Code), EncounterMovementPlaceholderConsts.Accomodation_CodeMaxLength, 0);
        Check.Length(admissionType_Code, nameof(admissionType_Code), EncounterMovementPlaceholderConsts.AdmissionType_CodeMaxLength, 0);
        Check.Length(apptCat_Code, nameof(apptCat_Code), EncounterMovementPlaceholderConsts.ApptCat_CodeMaxLength, 0);
        Check.Length(levelOfCare_Code, nameof(levelOfCare_Code), EncounterMovementPlaceholderConsts.LevelOfCare_CodeMaxLength, 0);
        Check.Length(pointOfCare_Code, nameof(pointOfCare_Code), EncounterMovementPlaceholderConsts.PointOfCare_CodeMaxLength, 0);
        Check.Length(specialty_Code, nameof(specialty_Code), EncounterMovementPlaceholderConsts.Specialty_CodeMaxLength, 0);
        Check.Length(subDocType_Code, nameof(subDocType_Code), EncounterMovementPlaceholderConsts.SubDocType_CodeMaxLength, 0);
        Check.Length(institutionType, nameof(institutionType), EncounterMovementPlaceholderConsts.InstitutionTypeMaxLength, 0);
        Check.Length(dischargeLocation, nameof(dischargeLocation), EncounterMovementPlaceholderConsts.DischargeLocationMaxLength, 0);
        Check.Length(pendingEventId, nameof(pendingEventId), EncounterMovementPlaceholderConsts.PendingEventIdMaxLength, 0);
        Check.Length(pendingRecordId, nameof(pendingRecordId), EncounterMovementPlaceholderConsts.PendingRecordIdMaxLength, 0);
        IdentificationText = identificationText;
        InstitutionId = institutionId;
        AdmissionDate = admissionDate;
        DischargedDate = dischargedDate;
        OpVisitTypeID = opVisitTypeID;
        InstitutionCode = institutionCode;
        MsgType = msgType;
        HAR = hAR;
        CIPInd = cIPInd;
        ReferralHospital = referralHospital;
        ReferralType = referralType;
        VIPInd = vIPInd;
        VVIPInd = vVIPInd;
        OpReferralHospital = opReferralHospital;
        OpReferralType = opReferralType;
        FCStatus = fCStatus;
        AccountStatus = accountStatus;
        OpVisitTypeDescription = opVisitTypeDescription;
        OpVisitType_Code = opVisitType_Code;
        Accident_Code = accident_Code;
        Accomodation_Code = accomodation_Code;
        AdmissionType_Code = admissionType_Code;
        ApptCat_Code = apptCat_Code;
        LevelOfCare_Code = levelOfCare_Code;
        PointOfCare_Code = pointOfCare_Code;
        Specialty_Code = specialty_Code;
        SubDocType_Code = subDocType_Code;
        InstitutionType = institutionType;
        DischargeLocation = dischargeLocation;
        EncounterId = encounterId;
        PendingEventId = pendingEventId;
        PendingRecordId = pendingRecordId;
        PatientId = patientId;
        AccomodationCode = accomodationCode;
        AdmissionTypeId = admissionTypeId;
        LevelOfcareId = levelOfcareId;
        SubDocType = subDocType;
        SpecialtyId = specialtyId;
        ExternalSourceId = externalSourceId;
        Status = status;
        AccidentCode = accidentCode;
        AccomodationCodeReason = accomodationCodeReason;
        ApptCatCode = apptCatCode;
        DischargeDisposition = dischargeDisposition;
        LateDischargeReason = lateDischargeReason;
        PointOfCare = pointOfCare;
        TransferReason = transferReason;
        VisitType = visitType;
        ResidentialStatus = residentialStatus;
    }

}

}

Answer

Hi,

Because there is no ConcurrencyStamp in the other table, so there is no concurrency check.

Hi, In both table I don't have ConcurrencyStamp but issue is encountered only in for 1 table, even though I'm doing same operation on both tables.

Showing 31 to 40 of 41 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33