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

Activities of "enerjisauretim"

We are using Aspnetzero last version (v11.1.0) and this version is dependent on Abp.AspNetZeroCore.Web 4.0.0. Azure SSO throws "No claim is missing" error in Abp.AspNetZeroCore.Web 4.0.0 version.

If I downgrade Abp.AspNetZeroCore.Web 3.0.0 it's working.

Since the codes are obfuscated in versions above 4.0.0, I cannot see the details. Have you figure out this error before?

  • Latest: (Containing Abp6.1.1)
  • Angular
  • .NetCore5

Hello,

Last week we upgraded our Aspnetzero project, from Abp:5.14.0 to 6.1.1 Randomly I was encountering a case in which backend appservices does not return data, just keeps loading and fails after timeout. It started happening in our test and production environments. Whenever we faced this issue, I specificly checked database access and everything works fine. There is no error logs btw.

Are there any similar issues or any bugs related with such cases?

Prerequisites

  • Power tools version: 2.7.3
  • Angular project
  • .net core

Hello there, Using power tools window, I attach some enities that are not within the current project folder, to create a relation with them. Lets say, I have a CustomerLicense entity and an external Customer entity which is outside of the current solution (CustomerLicense -> Customer relation in our case).

Using the attached GetAllForLookupTableInput.7z template, the generator results in GetAllForLookupTableInput.cs file, in which it seems it does not understand any relation with external Customer entity and does not replate {{NP_Foreign_Entity_Name_Here}} fields. Indentation of output file is broken thanks to Visual Studio btw.

Hello there,

We want to implement another .netcore project using an aspnetzero project's existing user, role and claims.

In other terms, we will have some side projects that represent some external modules of our zero project. And all of these projects users, role and claim mapping must be managed within the zero project. Is there any capability of aspnetzero framework which we should be using to satisfy this need?

we are thinking about identity server4 as the last option by delegating all user info to that server.

Question

Hello there,

I just want to ask you about the Blazor part of your roadmap. I've read your previous answers but they seemed old to me.

Do you have any plans for Blazor in near future?

Hi there,

Today I upgraded to the latest version of the aspnetzero framework, to enable Office365 login support for our corporate Azure Active Directory domain. However, it is not working. I have searched a lot, but it seems I have to rewrite the MSAL.js usage in order to make it working accordingly.

Could you please take a look to our configuration? Here is the configuration file for OpenID:

`"OpenId": {
      "IsEnabled": "true",
      "ClientId": "a6f3e01c-5eeb-4cce-8fce-e8df964152f2",
      "Authority": "https://login.microsoftonline.com/a730caa6-12ef-4586-9f28-6cfc59c76a6a/",
      "LoginUrl": "https://login.microsoftonline.com/",
      "ValidateIssuer": "true",
      "ClaimsMapping": [
        {
          "claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
          "key": "http://schemas.microsoft.com/identity/claims/objectidentifier"
        }
      ]
    },`

From the Azure Portal, I created an app registration, took clientid (a6f..) and tenant ids (a730...). The button is visible,** but after any successful login, it redirects me to the office.com**, instead of my application. I first tried on localhost, then on our test address. None of them working.

Hello there,

We almost edited all of your templates that are being used by RAD extension. However, there is no documentation about it. Is there a source code or any kind of documentation about the properties,conditions and everyting helpful that we can learn about the extension?

Hello there,

We extended the LdapAuthenticationSource in order to use it on linux environment via Novell library. Sometimes, Domain Controller does not respond within the predefined timeout, however, the application still logs me in although TryAuthenticateAsync method is returning false. We want users to only use their LDAP accounts, and on each login, we must precheck their existence and update their passwords accordingly in our system. However, as I have logged in before, probably, I am an already-registered user so I can log in although LDAP connection fails.

using System;
using System.Threading.Tasks;
using Abp.Configuration;
using Abp.Zero.Ldap.Authentication;
using Abp.Zero.Ldap.Configuration;
using Microsoft.Extensions.Logging;
using Novell.Directory.Ldap;
using PPM.Authorization.Users;
using PPM.MultiTenancy;

namespace PPM.Authorization.Ldap
{
    public class AppLdapAuthenticationSource : LdapAuthenticationSource<Tenant, User>
    {
        private readonly string _ldapDomain;
        private readonly string _ldapUserName;
        private readonly string _ldapPassword;
        private readonly ILogger<AppLdapAuthenticationSource> _logger;
        private readonly ILdapConnectionFactory _ldapConnectionFactory;


        public AppLdapAuthenticationSource(ILdapSettings settings, IAbpZeroLdapModuleConfig ldapModuleConfig,
            ISettingManager settingManager, ILogger<AppLdapAuthenticationSource> logger, ILdapConnectionFactory ldapConnectionFactory)
            : base(settings, ldapModuleConfig)
        {
            _logger = logger;
            _ldapConnectionFactory = ldapConnectionFactory;
            _ldapDomain = settingManager.GetSettingValueAsync(LdapSettingNames.Domain).Result;
            _ldapUserName = settingManager.GetSettingValueAsync(LdapSettingNames.UserName).Result;
            _ldapPassword = settingManager.GetSettingValueAsync(LdapSettingNames.Password).Result;
        }

        public override Task<bool> TryAuthenticateAsync(string userNameOrEmailAddress, string plainPassword,
            Tenant tenant)
        {
            var userDn = $"{userNameOrEmailAddress}@{_ldapDomain}";

            try
            {
                using (var connection = _ldapConnectionFactory.Create(10000))
                {
                    connection.Connect(_ldapDomain, LdapConnection.DefaultPort);
                    connection.Bind(userDn, plainPassword);
                    if (connection.Bound)
                    {
                        return Task.FromResult(true);
                    }
                }
            }
            catch (LdapException e)
            {
                _logger.LogInformation("Ldap Connection Error : " + e.Message);
            }

            return Task.FromResult(false);
        }

        public override async Task<User> CreateUserAsync(string userNameOrEmailAddress, Tenant tenant)
        {
            await CheckIsEnabled(tenant);
            var user = new User
            {
                UserName = userNameOrEmailAddress,
                Name = userNameOrEmailAddress,
                Surname = userNameOrEmailAddress,
                EmailAddress = userNameOrEmailAddress,
                IsEmailConfirmed = true,
                IsActive = true
            };

            var ldapUser = GetLdapUserDetail(user.UserName);
            return SetUserWithLdapDetail(user, ldapUser);
        }

        public override async Task UpdateUserAsync(User user, Tenant tenant)
        {
            await CheckIsEnabled(tenant);
            var ldapUser = GetLdapUserDetail(user.UserName);
            SetUserWithLdapDetail(user, ldapUser);
        }

        private LdapEntry GetLdapUserDetail(string userName)
        {
            var userDn = $"{_ldapUserName}@{_ldapDomain}";

            using (var connection = _ldapConnectionFactory.Create(10000))
            {
                connection.Connect(_ldapDomain, LdapConnection.DefaultPort);
                connection.Bind(userDn, _ldapPassword);
                var searchFilter = string.Format("sAMAccountName={0}", userName);
                var result = connection.Search("DC=******,DC=local",
                    LdapConnection.ScopeSub,
                    searchFilter,
                    new[]
                    {
                        "samaccountname", "givenName", "sn", "mail"
                    },
                    false
                );

                var ldapUser = result.Next();
                return ldapUser ?? null;
            }
        }

        private User SetUserWithLdapDetail(User user, LdapEntry ldapUser)
        {
            var samAccountName = ldapUser.GetAttribute("samaccountname").StringValue;
            var givenName = ldapUser.GetAttribute("givenName").StringValue;
            var surName = "";
            try
            {
                surName = ldapUser.GetAttribute("sn").StringValue;
            }
            catch
            {
                // ignored
            }

            var mail = ldapUser.GetAttribute("mail").StringValue;

            if (!string.IsNullOrEmpty(samAccountName))
            {
                user.UserName = samAccountName;
            }

            user.Name = givenName;
            user.Surname = surName;
            user.EmailAddress = mail;
            user.IsActive = true;

            return user;
        }
    }
}

How to register a concrete class with multiple public interfaces in the IocManager

Hello,

I inspected the XmlEmbeddedFileLocalizationDictionaryProvider's source code and saw that there is no way to support case-insensitivity in terms of keys, except from rewriting the whole provider. Mistakenly in the development phase, we had this trouble a lot; for example, L("Products") and L("products") produces different results. This is very inconvenient for our projects and in my opinion, it should be enabled via configuration or replacing the provider?

Showing 1 to 10 of 15 entries