Activities of "mgurer"

Answer

Hi,

I think problem was due to a property on Message entity. The cli typed property was mapped to a db column containing json string. The json mapping convension somehow didnt worked in new version. Everytime context is saved, the context assumed that the property is altered so savechanges triggered once more which lead the loop in unitofwork.

I simplified the mapping convension of entity property to json column, the problem gone away. I wont dig into detail and have no clue what changed between abp versions.

Here is the mentioned simplified convension function which works fine.

public static PropertyBuilder<Message> HasMessageJsonConversion(this PropertyBuilder<Message> propertyBuilder) { var settings = GetSettings();

var converter = new ValueConverter&lt;Message, string&gt;
(
    v => JsonConvert.SerializeObject(v, settings),
    v => JsonConvert.DeserializeObject&lt;Message&gt;(v, settings)
);

var comparer = new ValueComparer&lt;Message&gt;
(
    (l, r) => l.Equals(r, settings),
    v => v == null ? 0 : JsonConvert.SerializeObject(v, settings).GetHashCode(),
    v => JsonConvert.DeserializeObject&lt;Message&gt;(JsonConvert.SerializeObject(v, settings), settings)
);

propertyBuilder.HasConversion(converter);
propertyBuilder.Metadata.SetValueConverter(converter);
propertyBuilder.Metadata.SetValueComparer(comparer);

return propertyBuilder;

}

Thanks Murat

Thanks

No related backlog item is listed about the update.

https://docs.abp.io/en/commercial/latest/road-map

Thanks for your answer. I have already set up Elastic APM and most of the loads and errors takes place in abp's token/handle method. It seems that there is a performance issue there. I hoped you may be avare of the issue. According to my findings, all the bottlenecks seems to occur in abp's built in endpoints. For me, the proplem is that Abp's oppeniddict implementation can not handle high load. Thanks.

Hi,

Everything works fine.

I also deleted subdomain cookies within a js interval of 500 ms.

Thanks.

Hi again.

Some progress made finally.

I have two issues now;

1 - I have applied the script on blazor project. Now cookies are dubled with subdomain and root domain. I have tried to delete the cookie for the subdomain but still cookies are doubled. Maybe it will be helpful to unsubscribe before new subscribtion.

function setCookie(name, value, domain, day = 365) {
    delete_cookie(name, '/', document.location.host);
    var expires = new Date();
    expires.setTime(expires.getTime() + (day * 24 * 60 * 60 * 1000));
    document.cookie = name + '=' + value + ';expires=' + expires.toUTCString() + ';domain=' + domain + ';path=/';
}
function get_cookie(name) {
    return document.cookie.split(';').some(c => {
        return c.trim().startsWith(name + '=');
    });
}
function delete_cookie(name, path, domain) {
    if (get_cookie(name)) {
        document.cookie = name + "=" +
            ((path) ? ";path=" + path : "") +
            ((domain) ? ";domain=" + domain : "") +
            ";expires=Thu, 01 Jan 1970 00:00:01 GMT";
    }
}

This issue is not big deal, because I see that theme is synchronised when I switch selected theme on blazor ui.

2 - On authserver project, I tried to apply the same javascript but I get an error indicating leptonx is not defined. I guess the flow is somehow different for auth-server project. This issue needs to be fixed, when I set theme on auth-server site, synchronisation gets broken again.

hi,,

that does not help.

still abp loptonx theme cookies are created for subdomain.

I could able to apply the code you provided from auth-server app. Changed the cookie name with the ones below. Still no chage. lpx_appereance lpx_loaded-css

I could not even apply the given code for blazor webassembly ui. Too many missing types.

I have traced all abp source codes, public/commercieal, and could not find where you place these cookies.

I beleive I am not the only one experiencing this problem, you should have more common, built-in solution for this theme synchronisation issue. Blazor ui and auth-server ui must also be out-of-phase for someone else.

Thanks.

Can you share the type of the options variable. It is not stated in the document.

Any suggestions?

By the way, the I have checked your answer. On localhost, the app runs as you described. Theme cookies are set on "localhost" domain and ports are ignored. So same cookie for both sites are shared.

On production, I have two seperate subdomain. admin.mysite.com and auth.mysite.com The theme cookies are set for each domain individualy and the values differ between cookies so the experience is broken.

Hello, I will check your reply.

Actually I am not interested about the blazor admin UI. I have a custom UI admin app implemented with VUE. I can not figure out how to open auth-server app so that it renders specific theme. Maybe I can pass a querystring param to the auth-server redirect url.

Showing 1 to 10 of 42 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13