Activities of "aeffegroup"

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

Hello, we have activated the File-Management module in our project and we wanted to replicate a simple file upload feature in one of the Angular components that we have created with the CRUD generator of the Abp Suite. The @abp/uppy package is not documented at all and your installation instructions (using npm -i) is wrong; we managed to install the @abp/uppy package only using yarn. Since the file-management module is completely locked we cannot inspect the sources and we haven't found any documentation regarding the integration of the file upload component in a "standard" Angular component created with the Abp Suite or manually.

Can you please provide us a code sample or some instructions to help us add file upload features to our ABP.IO project ? In the backend we are using your BlobService configured to store files on the file system and it is working correctly.

Thank you very much, Regards, David Bandinelli Aeffegroup

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

We spent a lot of time trying to authenticate users to our LDAP directory service without success. Here is the LDAP account configuration:

(the IP is not the real one)

Here is the error we always see in the application log:

2021-02-11 15:18:31.109 +01:00 [INF] Request starting HTTP/2 POST https://localhost:44360/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fresponse_type%3Dcode%26client_id%3DDocumentale_App%26state%3DMmRDYlpUS1QuYktKMGFUVWlLUzhqVGRQSEltRHNlbUFoN3ZreTdodG9ZNDRu%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A4200%26scope%3Dopenid%2520offline_access%2520Documentale%26code_challenge%3DRBNiqmFE9lUmfdrpkaeZsYHd0-pZv4KRxR_9Uq-KTfk%26code_challenge_method%3DS256%26nonce%3DMmRDYlpUS1QuYktKMGFUVWlLUzhqVGRQSEltRHNlbUFoN3ZreTdodG9ZNDRu application/x-www-form-urlencoded 756
2021-02-11 15:18:31.109 +01:00 [INF] CORS policy execution failed.
2021-02-11 15:18:31.109 +01:00 [INF] Request origin https://localhost:44360 does not have permission to access the resource.
2021-02-11 15:18:31.116 +01:00 [INF] No CORS policy found for the specified request.
2021-02-11 15:18:31.117 +01:00 [INF] Executing endpoint '/Account/Login'
2021-02-11 15:18:31.117 +01:00 [INF] Route matched with {page = "/Account/Login", action = "", controller = "", area = ""}. Executing page /Account/Login
2021-02-11 15:18:31.117 +01:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2021-02-11 15:18:31.138 +01:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LoginModel.OnPostAsync - ModelState is "Valid"
2021-02-11 15:18:31.203 +01:00 [ERR] Credenziali non valide. Credenziali non valide. Result: 49. Method: ldap_parse_result. Details: errorMessage: 80090308: LdapErr: DSID-0C0903D3, comment: AcceptSecurityContext error, data 52e, v3839
matchedMessage: 
LdapForNet.LdapInvalidCredentialsException: Credenziali non valide. Credenziali non valide. Result: 49. Method: ldap_parse_result. Details: errorMessage: 80090308: LdapErr: DSID-0C0903D3, comment: AcceptSecurityContext error, data 52e, v3839
matchedMessage: 
   at LdapForNet.Native.LdapNative.ThrowIfError(SafeHandle ld, Int32 res, String method, IDictionary`2 details)
   at LdapForNet.LdapConnection.ThrowIfParseResultError(IntPtr msg)
   at LdapForNet.LdapConnection.BindAsync(LdapAuthType authType, LdapCredential ldapCredential)
   at Volo.Abp.Ldap.LdapManager.AuthenticateLdapConnectionAsync(ILdapConnection connection, String username, String password)
   at Volo.Abp.Ldap.LdapManager.AuthenticateAsync(String username, String password)

("credenziali non valide" means "invalid credentials").

We checked our LDAP server and tried to connect it with the "Active Directory Explorer" utility with the same parameters and it is working fine.

We have tried to write a simple consolle application using the LdapForNet library and it worked using the same connection parameters; we managed to query the users on our LDAP. Here is the code of this simple app:

using LdapForNet;
using System;
using static LdapForNet.Native.Native;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var cn = new LdapConnection())
            {
                try
                {
                    cn.Connect("ldap://221.222.223.224:389");
                    // bind using userdn and password
                    cn.Bind(LdapAuthMechanism.SIMPLE, "aeffegroup\\arcadocint", "passwordgoeshere");
                    var entries = cn.Search("OU=Software,OU=Aeffegroup,DC=aeffegroup,DC=local", "(objectClass=*)");
                } catch (Exception exception)
                {
                    bool stopHere = true;
                }
            }
        }
    }
}

We have tried every possible combination of user name in the ABP.IO login page but we always get the same ldap error in the log; we tried authenticating in the following ways:

  • username
  • username@aeffegroup.local
  • username@aeffegroup.biz

(even if we try with non existing usernames and/or wrong passwords we always receive the same error code Result: 49. Method: ldap_parse_result. Details: errorMessage: 80090308: LdapErr: DSID-0C0903D3 from the backend.

Please help us. Thanks, Regards, David Bandinelli Aeffegroup

Hello, we are working with ABP CLI version 4.2.1. We need to change the login page in Angular, add a custom logo and modify the layout. We tried to follow the online documentation ( https://support.abp.io/QA/Questions/306/Custom-Login-Page-For-Angular ) , but were unable to customize the login. The documentation does not seem to be updated to our purchased version (for example, you refer to "import { AddReplaceableComponent } from '@abp/ng.core';" but in our version there's no refernce to AddReplaceableComponent but only to "import { ReplaceableComponentsService } from '@abp/ng.core';") We also tried to follow this guide (https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement#how-to-replace-a-component), in this case we got the change of the logo but insede the application, but this is not the result we wanted to obtain.

We ask you to provide us with step-by-step documentation on how to modify the "login" and "redirect" modules.

A code example is welcome

Hi, i tried to replace the login, but i found difficulites. First i created folders in wwwroot, Pages/Account. Inside i created 1 Login.cshtml file with razor, and another one file CustomLoginModel.cs You can see the image

My question: why when i try to replace "@model Volo.Abp.Account.Public.Web.Pages.Account.LoginModel" in my cshtml file i cant't find the reference to my namespace class CustomLoginModel.cs ?

Hi, in Angular ABP.io version 4.2, how can I hide or remove the administration menu based on roles? For example, i want display the "administraton" menù only if i'm an "admin"

i tried something like this but it disables for all users

Question

I developed an app in Angular and .net Core. I have deployed both the frontend and the lbackends in https. Now I need to migrate everything under the "http" port.in This is the file enviroment.production.ts:

This is a piece of my app.config : "App": { "SelfUrl": "http://MIODOMINIO-BACKEND", "ClientUrl": "http://MIODOMINIO-FRONTEND", "CorsOrigins": "http://.MIODOMINIO-FRONTEND, http://.MIODOMINIO-BACKEND" },

In DB i changed the url in these table

  1. Table “IdentityServerClientRedirectUris”
  2. Table “IdentityServerClientPostLogoutRedirectUris”
  3. Table “IdentityServerClientCorsOrigins”

There seems to be CORS or unauthorized Token problems. What am I doing wrong? Send me a detailed guide on how to set up the http protocol environment please.

Answer

Hi, we followed the instructions of the link you mentioned but we still cannot login from our frontend.

Here is a detailed description of the problem:

  • We made the changes to the HttpApi.Host project as instructed and redeployed the backend.
    • added the class "SameSiteCookiesServiceCollectionExtensions" to the HttpApi.Host project.
    • modified the HttpApiHost module:
      • added "context.Services.AddSameSiteCookiePolicy();" in "ConfigureServices" method.
      • added "app.UseCookiePolicy()" in "OnApplicationInitialization" method.
  • The backend's binding is on HTTP port 80 with header name of "mydomain-backend.xyz.it"
  • The backend is working correctly, if we try to login manually calling the API method "/api/account/login" it works and we receive a "success" response.
  • The frontend's binding is on HTTP port 80 with a different header name "mydomain-frontend.xyz.it".
  • When we access the frontend, we can see the home page layout and we can see in the browser's network tab that a call is made to "application-configuration" on the backend; the HTTP status of this call is 200 and we can see the localization resources in the response body.
  • When we try to click on the "Login" button on the frontend layout, nothing happens and the network tab does not report anything.
  • If we try the same exact configuration on a local development PC, we see that when we click on the login button in the frontend, we are redirected to the "localhost:44360/Account/Login" page.
  • In the development enviroment we see this call when we access the frontend: http://localhost:44360/.well-known/openid-configuration (we get the response: net::ERR_CONNECTION_RESET ).
  • In the development environment, even if we configured everywhere to use HTTP, we see that the endpoint "https://localhost:44360/.well-known/openid-configuration" is still answering only on HTTPS.
  • If we inspect the network browser on the local development machine we see that there is a call to an "openid-configuration" endpoint.
  • In the deploy environment we do not see this call, we only see the call to the "application-configuration" endpoint.
  • In the deploy environment DB, we double cheched the Identity configuration tables (IdentityServerClientRedirectUris, IdentityServerClientPostLogoutRedirectUris, IdentityServerClientCorsOrigins).

Can you please help us ?

Answer

i don't have "app.UseHttpsRedirection();"

This is my OnApplicationInitialization public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); var env = context.GetEnvironment();

        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.UseAbpRequestLocalization();

        if (!env.IsDevelopment())
        {
            app.UseErrorPage();
        }

        //per protocolo HTTP
        app.UseCookiePolicy(); // added this, Before UseAuthentication or anything else that writes cookies.

        app.UseCors(DefaultCorsPolicyName);

        app.UseVirtualFiles();
        app.UseRouting();
        app.UseAuthentication();
        app.UseJwtTokenMiddleware();

        if (MultiTenancyConsts.IsEnabled)
        {
            app.UseMultiTenancy();
        }

        app.UseIdentityServer();
        app.UseAuthorization();
        app.UseSwagger();
        app.UseAbpSwaggerUI(options =>
        {
            options.SwaggerEndpoint("/swagger/v1/swagger.json", "Documentale API");
        });
        app.UseAuditing();
        app.UseConfiguredEndpoints();
        // hangfire
        app.UseHangfireDashboard();

    }
Answer

Please share the error log, thanks.

I'm sorry, but i can't attach my log file. Thi is only the last part of my log: 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.AbpAspNetCoreMvcUiModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.AbpAspNetCoreMvcUiBootstrapModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Packages.AbpAspNetCoreMvcUiPackagesModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpAspNetCoreMvcUiWidgetsModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.AbpAspNetCoreMvcUiThemeSharedModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.AbpAspNetCoreMvcUiMultiTenancyModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.LeptonTheme.Management.LeptonThemeManagementWebModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial.AbpAspNetCoreMvcUiThemeCommercialModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.AbpAspNetCoreMvcUiLeptonThemeModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.AspNetCore.Authentication.JwtBearer.AbpAspNetCoreAuthenticationJwtBearerModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.Identity.AspNetCore.AbpIdentityAspNetCoreModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.Account.Public.Web.AbpAccountPublicWebModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.Account.Web.AbpAccountPublicWebIdentityServerModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.BlobStoring.FileSystem.AbpBlobStoringFileSystemModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.Hangfire.AbpHangfireModule 2021-06-01 14:14:49.727 +02:00 [INF] - Volo.Abp.BackgroundJobs.Hangfire.AbpBackgroundJobsHangfireModule 2021-06-01 14:14:49.727 +02:00 [INF] - Aeffegroup.COOP.Documentale.DocumentaleHttpApiHostModule 2021-06-01 14:14:50.337 +02:00 [INF] Start installing Hangfire SQL objects... 2021-06-01 14:14:50.565 +02:00 [INF] Hangfire SQL objects installed. 2021-06-01 14:14:50.582 +02:00 [INF] Starting Hangfire Server using job storage: 'SQL Server: SRVWNAEFFEAPP01\SQLEXPRESS@COOP_Documentale' 2021-06-01 14:14:50.582 +02:00 [INF] Using the following options for SQL Server job storage: Queue poll interval: 00:00:15. 2021-06-01 14:14:50.582 +02:00 [INF] Using the following options for Hangfire Server: Worker count: 10 Listening queues: 'default' Shutdown timeout: 00:00:15 Schedule polling interval: 00:00:15 2021-06-01 14:14:50.653 +02:00 [INF] Starting IdentityServer4 version 4.1.1+cebd52f5bc61bdefc262fd20739d4d087c6f961f 2021-06-01 14:14:50.829 +02:00 [INF] Server srvwnaeffeapp01:17188:5f4bf36d successfully announced in 227,4412 ms 2021-06-01 14:14:50.867 +02:00 [INF] Server srvwnaeffeapp01:17188:5f4bf36d is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler... 2021-06-01 14:14:51.433 +02:00 [INF] Server srvwnaeffeapp01:17188:5f4bf36d all the dispatchers started 2021-06-01 14:14:52.004 +02:00 [INF] Using the default authentication scheme Identity.Application for IdentityServer 2021-06-01 14:14:52.717 +02:00 [INF] Initialized all ABP modules. 2021-06-01 14:14:52.785 +02:00 [INF] Application started. Press Ctrl+C to shut down. 2021-06-01 14:14:52.785 +02:00 [INF] Hosting environment: Production 2021-06-01 14:14:52.785 +02:00 [INF] Content root path: C:\inetpub\wwwroot\RT_Backend 2021-06-01 14:14:52.824 +02:00 [INF] Request starting HTTP/1.1 GET http://registrotrattamenti-back.coopitalia.coop.it/api/abp/application-configuration - - 2021-06-01 14:14:55.442 +02:00 [INF] CORS policy execution successful. 2021-06-01 14:14:55.918 +02:00 [INF] No CORS policy found for the specified request. 2021-06-01 14:14:55.978 +02:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2021-06-01 14:14:56.028 +02:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc). 2021-06-01 14:14:58.153 +02:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'. 2021-06-01 14:14:58.233 +02:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 2199.9412ms 2021-06-01 14:14:58.235 +02:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2021-06-01 14:14:58.271 +02:00 [INF] Request finished HTTP/1.1 GET http://registrotrattamenti-back.coopitalia.coop.it/api/abp/application-configuration - - - 200 - application/json;+charset=utf-8 5447.4280ms

Answer

Hi,

I can't see anything error in your logs. can I check it remotely? shiwei.liang@volosoft.com

Exactly, there are no errors on the subject in the log file. Unfortunately online it is not possible to reach the domain due to problems related to the http port. If you prefer, I can send you my solution, both net core and angular.

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