Activities of "Jurjen"

thank you. I'll look into that.

Yes, that works !! :-D Thank you!

Hi,

The code does not work. Looking at the gitbhub link, I see that
Response.HasStarted has not been added to the 'if' statement.

if (context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK && context.HttpContext.Response.HasStarted == false && // <-- this one context.Result == null) {

Goodmorning Maliming,

Thanks for you quick response :-) I have added the code to the solution.

The AbpNoContentActionFilter class from your response needs to be MyNoContentActionFilter?

When running the code I still get the exception.

When I remove the code from OnActionExecutionAsync(...) which sets the Response.Statuscode, then the exception does not occur.

Is that correct ?

public class MyNoContentActionFilter : IAsyncActionFilter, ITransientDependency
{
    public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
    {
        await next();
    }
}       

When you correct this in a next release will this be mentioned in the release notes? So we can remove this custom code from our solution ?

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 ?

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.

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