Learn More, Pay Less!
Limited Time Offer!

Activities of "Jurjen"

  • ABP Framework version: v4.4.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes (IDserver not seperate)
  • Exception message and stack trace: In download
  • Steps to reproduce the issue: in download PDF

Good afternoon,

We’re experiencing some problems when using CSLA.NET (https://cslanet.com/)with your product (commercial).

In project HttpApi.Host we are using a DataPortalController (api-controller) wich does NOT inherit from AbpController. This controller can be used from various clients to retrieve Csla-businessobjects.

We’ve been prototyping this in the beginning of Q2 using ABP.IO v4.3 and back then it worked fine.

Last week we picked up where we left of in April and for some reason it doesn’t work anymore. We’re getting errors in the HttpApi.Host project (see Error-StackTrace in logs.txt below)

We’ve spent several days chasing this problem and we think there’s some middleware or ‘hook’ into the http pipeline which tries to change something in the response.

We’ve isolated the CSLA.NET in a separate solution, not using ABP.IO, just a regular WebApi Core project in combination with a regular Blazor client and that works fine. We think that there’s something in the ABP http-pipeline causing this. Maybe it’s the ABP-Auditing? (We tried to disable auditing for this controller with [DisableAuditing] attribute but that doesn't seem to make a difference, still throws an exception)

We were wondering if you could help us in locating the problem (and resolving the problem) as you’re far more familiar with how http works in ABP.IO.

Flow:

[BlazorClient] BusinessObject Person

[BlazorClient] Person.Get(23)                 // Get person where Id =23

[BlazorClient] Remote DataPortal is called over http   https://localhost:<port>/DataPortal

[HttpApi]      Call is received, Fetch is called on BusinessObject Person

[HttpApi]      Normally the Fetch will do a DB call but in this example we just fill properties with
               some fixed values.

[HttpApi]      When the response is sent/returned from the DataPortal to the requesting client it
               seems that there is ‘something’ wich interveens and somehow causes a problem.

As you can see in the log (in StepsToReproduce.PDF), the controller-method PostAsync is successful after wich something is done resulting in ‘Added 0 entity changes to the current audit log’ (twice) and the an exception occurs.

As we cannot attach files I've created a weTransfer link : <Removed> This download contains the example code + database backup and StepsToReproduce.PDF If the link has expired, please contact me via info@idas.nl for a new link of I can send the files to you directly.

Please don't hesitate to contact me if you cannot reproduce the problem or if you're having questions.

Kind regards

Jurjen de Groot Idas BV

  • ABP Framework version: v4.3
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I'm looking into creating some BackgroundJobs. How to create them and how to use the args is pretty straight forward I guess but it's not clear to me in wich (application or module) project the backgroundjobs should be created.

I guess not in the UI, EF or DB-related projects, but could you indicate for application and for module where to create these classes ?

Application
Application.Contracts
Domain
Domain.Shared
HttpApi
HttpApi.Client
{Application}.HttpApi.Host

I have read the documentation and see examples of how to use and enqueue the job but WHERE to create these jobs is not in the documentation. Maybe this could be added to the documentation for future use?

Kind regards, Jurjen.

https://docs.abp.io/en/abp/latest/Background-Jobs https://docs.abp.io/en/abp/latest/Modules/Background-Jobs (= TODO)

maliming,

Thanks, I got this to work.

OnLogOutSucceeded/OnLogInSucceeded are now caught :-)

I have added this 'Authentication.razor' component to my PROJECT.Blazor project. Then I added the Authentication component to my index.razor (her on line 9)

@page "/"
@inherits appFileManagerComponentBase
<div class="row entry-row">
    <div class="col-auto">
        <h1 class="content-header-title">Welcome to appFileManager!</h1>
    </div>
</div>

<Authentication />  // <---- Authentication Inserted here ---->

<Card>
    <CardBody>
        
        <h2>
            The Tutorial
        </h2>

        <p>
            See the <a href="https://docs.abp.io/en/commercial/latest/tutorials/book-store/part-1?UI=Blazor" target="_blank">Web Application Development Tutorial</a> to learn how to develop
            web applications with the ABP Commercial and the Blazor UI.
        </p>
    </CardBody>
</Card>

However, I'm getting the follwing error

-- Unhandled exception rendering component: Invalid action ''.

I have tried putting 'Login' in action but then the login page is automatically shown and not the index page. Also when I do login, the event 'OnLogInSucceeded' seems to be fired many times...

I'm not sure how proceed from here ...

thank you for your response.

I see various classes in the namespace Volo.Abp.Http.Client.IdentityModel but cannot figure out how to 'hook in' to the events 'after succesful login' and 'after logout'

I'm pretty sure ABP must have some mechanism like that, for instance in it's UI to react to a logoff so the menu can change, the header in the top-right of the screen so the current userinfo can be shown (of not, after logoff).

I don't know how to explain more clearly.

I need an event or hook into the :

  • 'after succesfull login'
  • 'after logout'

Hi Mailiming,

I will look into the IAccessTokenProvider. But I think you missed the questions at the bottom of my message.

  • We need some way to know when the user has succesfully logged in

    so we can (re)set the token in our Csla environment

  • We also need to know when the user has logged off

    so we can clear the token in our Csla environment

I've looked, but I suppose that mechanism is burried deep within the ABP framework. Is there any way we can accomplish this ? maybe using some sort of eventhandler? I'm sure your UI is also reacting to these login/logoff events ?

• ABP Framework version: v4.3 rc1 • UI type: Blazor • DB provider: EF Core • Identity Server Separated: no • ABP Commercial application

When running the blazor application locally I can see that calls to the HttpApi.Host have a httpheader Authorization with value ‘bearer ’.

<br> We will be using Csla as our businesslogic/data-layer for our application. Csla uses a ‘dataportal’ to retrieve data from the database, this dataportal call routes through the dataportalcontroller on the WebApi and is visible in swagger (https://localhost:44321/api/Blazor/DataPortal) just like all the other Abp methods like AbpApiDefinition (https://localhost:44321/api/abp/api-definition).

Csla ‘calls’ the DataPortal using its own httpClient, however thát httpclient does not have a defaultHttpHeader ‘Authorize’ we get an not-authorized error when calling the DataPortal method on the WebApi. We have been testing and when we sort of manually add defaultHttpHeader Authorize with the token to the httpClient when calling the DataPortal, it doés work :-)

I’m not sure but can we ‘get’ a ready to go (authorized) httpClient from ABP? I’ve tried using

[Inject] public HttpClient httpClient {get;set;}

But there is no ‘Autorize’ DefaultHttpHeader supplied in the resulting httpClient.

At this time we’d like to ask:

  • How can we hook into something like a ‘login-successful’ event and retrieve information (like the access_token) so we can store that for later use in the httpClient we use when calling the dataportal method on the webAPI?
  • How can we hook in to a ‘logout-successful’ kind of event so we can clear the access_token in our code.

It works now, thank you for your support !

Hi Alper,

Yes I did add our private Nuget address to the nuget.config. But in the appsettings.json there’s this line :

"AbpLicenseCode": "{PUT_YOUR_LICENSE_CODE_HERE}"

If I leave it in the file like that the app won’t start and leaves this message in the log file:

2021-02-26 09:43:29.782 +01:00 [ERR] ABP-LIC-0020 - License code not found! Ensure that your appsettings.json has "AbpLicenseCode" key with your license code. 2021-02-26 09:43:29.782 +01:00 [ERR] ABP-LIC-0008 - License check failed for 'Volo.Abp.Identity.Pro.HttpApi-v4.2.0.0'.

If I put our GUID in the AbpLicenseCode the app won’t start either and leaves a similar message in the log file. So I guess the GUID is not the license key. Where can we find the license key because we can't seem to find it on the page where out secret nuget url is.

Thanks for the download link, going to check it rightaway

Showing 11 to 20 of 22 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on February 07, 2025, 05:40