Activities of "viswajwalith"

hi

how about picking the connection string key at run time like "AbpIdentityServer_<<TENANTNAME>>"

If you don't want to use Database Connection Strings

You can override and replace the MultiTenantConnectionStringResolver service.

https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs#L27-L82

https://github.com/abpframework/abp/blob/dev/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs

Thanks, we will try

hi

You must set the tenant connection string under the Database Connection Strings modal.

The ProductService can't use SQL server and MongoDB at the same time. eg: Host and tenants can use different SQL server connection strings. but can't use MongoDB.

The values are stored in the SaasTenantConnectionStrings table of the host database.

Ya ya, we dont want to use both at the time, we will be using eaither of that but just trying to use different servers for the same.

how about picking the connection string key at run time like "AbpIdentityServer_<<TENANTNAME>>"

hi

You can configure the AbpDbConnectionOptions to add your connection string name. Then you can change it in the Database Connection Strings modal.

https://abp.io/docs/latest/framework/fundamentals/connection-strings#configuring-the-database-structures

Thanks for the update, do you think overrsing any of the file can work to have tenant specific DB connection string or using the connection string name something like "AbpIdentityServer_<<TENANTNAME>>" ?

hi

You can set a different connection string for each microservice. but you can't set two connection strings for one microserve.

even in this case, no option to set a connection string for the micro services which are using MongoDB?

ABP Framework version: v7.3.2 UI Type:MVC Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes

We would like to maintain the tenant specific connection for both SQL and MongoDB, but when we go for featurs we are not able to see Mongo Services in the drop down? is it not supported?

Also what if we want to read the connection strings from key valut for each tenant?

When we tried the same by hosting in our Dev Environemnt we observed that ARRAffinity cookie is not coming at all. We are suspecting something related to Azure Web APP hosting.

On the other hand we tried adding code to remove "ARRAffinity" by

public class RemoveARRAffinitySameSiteCookieMiddleware { private readonly RequestDelegate _next;

 public RemoveARRAffinitySameSiteCookieMiddleware(RequestDelegate next)
 {
     _next = next;
 }

 public async Task InvokeAsync(HttpContext context)
 {
     context.Response.OnStarting(() =>
     {
         context.Response.Cookies.Delete("ARRAffinitySameSite");
         return Task.CompletedTask;
     });

     await _next(context);
 }

}

In Auth server

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

 var configuration = context.ServiceProvider.GetRequiredService&lt;IConfiguration&gt;();

 app.Use(async (ctx, next) =>
 {
     if (ctx.Request.Headers.ContainsKey("from-ingress"))
     {
         ctx.SetIdentityServerOrigin(configuration["App:SelfUrl"]);
     }

     await next();
 });

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

 app.UseAbpRequestLocalization();

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

 app.UseCorrelationId();
 app.UseStaticFiles();
 app.UseRouting();
 app.UseCors();
 app.UseHttpMetrics();
 app.UseAuthentication();
 app.UseJwtTokenMiddleware();
 app.UseMultiTenancy();
 app.UseAbpSerilogEnrichers();
 app.UseUnitOfWork();
 app.UseIdentityServer();
 app.UseAuthorization();
 app.UseAuditing();
 app.UseMiddleware&lt;EhsWatchVeSecurityHeadersMiddleware&gt;();
 app.UseMiddleware&lt;RemoveARRAffinitySameSiteCookieMiddleware&gt;();
 app.UseHsts();
 app.UseConfiguredEndpoints(endpoints =>
 {
     endpoints.MapMetrics();
 });

}

but still getting that cookie .

the only difference is

  • Before Value: ARRAffinitySameSite=fd496f44e02cfb761c8aa28c89623dc7a80cfa26dff26b2575b73746f0673dbb;Path=/;HttpOnly;SameSite=None;Secure;Domain=xxxxxx.xxx.xxx.xx

  • Value After code change: ARRAffinitySameSite=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/

do you this make any difference, but still we are not sure of removing ARRAffinitySameSite because this may impact the behaviour of load balancer

you can try remove some headers to check if it's work

Ok will try and update you.

In Sample it is working fine where as We have a requirement to implement RabbitMqDistributedEventBus and have both 'Publishing Event' and 'Distributed Event Handler' in the same service. when we try From swagger, request execution completing after executing the 'publishing event' without waiting for 'Distributed Event Handler' to be completed, later 'Distributed Event Handler' is processing. But when we try from web application, web request is not completing until 'Distributed Event Handler' complete the Process.

if we implement 'Publishing Event' in one service and 'Distributed Event Handler' in another service, from web application also it is working like swagger and not waiting to complete 'Distributed Event Handler' process.

Is there any way to implement both 'Publishing Event' and 'Distributed Event Handler' in same service and if we request from web application, request should not wait for complete 'Distributed Event Handler' process.

Hi,

could you share the error message and some screenshots?

Hi There is no error message as this is getting blocked by clients firewall system due to suspeous content of the headers shared. Let me know if you have any queries

ABP Framework version: v5.1.3 UI Type: MVC Database System: SQL Server / MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue: We are using the Active Directory for Login Process and request is getting blocked after after successuly login and redirecting to our web client

We are faciing issue with the User Cookie Headers with one of the Clients Firewall, The request header info is as follows:

GET /Account/Login/?__tenant=xxx HTTP/1.1 Accept: / Host: xxxxxx.xxx.xxx.xx Cookie: .AspNetCore.Antiforgery.c9JTe_bLGaM=CfDJ8FRhYrLUrBdPg2ipof6Ze16RfGI0ZJKke6iRRofx3cFbq_tGn3HTTRD_7JKLtMzMedYMb1l8OhPx3xX6z9j1-aSSaXj1SRk2ORAcb6KOtTPmaOjcZ6RopamvmEiecEu3ljT5TFHayk2MxFUVMCgqLDo; path=/; samesite=strict; httponly; XSRF-TOKEN=CfDJ8FRhYrLUrBdPg2ipof6Ze17tsIyUCs-tAYzfoekhfgr13OA5w4tyzwXj-Hl_E6Gwkpdtn4nXDZGTpm3EBEX64NjeDhuI5CF2ZCvUOB73MJj-CKIHYapt9k5BrFRIkhnmxvZx5UOy_ez2dO_9fGa_Cks; expires=Mon, 15 May 2034 23:36:10 GMT; path=/; secure; samesite=none; .AspNetCore.Mvc.CookieTempDataProvider=CfDJ8FRhYrLUrBdPg2ipof6Ze14-m4tMwAkRe0rwhNpl2P9u1CF-toHYP6HqsIRlyoOHBm8ptS-5uL5JuLZ5s_syooXW6nUzC0z1f-H_coYQTo3p4TIjHjpX6cSy58Pfl8LcZPBHqTw81Ez_jZsLan3eH9ncIklIKi3xuyIUZq89Cztb; path=/; samesite=lax; httponly; ARRAffinity=77f12f85c9afc4c4219e1ebcbabf3c363c124c1272c6f1766e41bee0c3ed9b13;Path=/;HttpOnly;Secure;Domain=xxxxxx.xxx.xxx.xx; ARRAffinitySameSite=77f12f85c9afc4c4219e1ebcbabf3c363c124c1272c6f1766e41bee0c3ed9b13;Path=/;HttpOnly;SameSite=None;Secure;Domain=xxxxxx.xxx.xxx.xx; DCT_SP_Cookie=!rJI1vQtcC6kQKiPgElklsn4lwoYxwAGdSfWPx/X43eEKGa3yOoLohwL48lwE7DmrTLv7W9uI7LC+bw==; path=/; Httponly; Secure; TS017caf0c=01dbd0522d0c40bd5dc6161d190c1229ca2cbc4113dbe13debd550f3bdabfcd49e51511c46a1c9492a9191fad0231d4f2609b2c9c05e4918267ed51bebfbd86bcbac3dd37dd5b6042d42ae7ef5f2cec887bdcb2905df6962249646cbb6079835441f65fdc686e12d6161abceb2c2bbd925a46d613e; Path=/; TS01fabc35=01dbd0522de0e527b70608f9798164443d8d592257dbe13debd550f3bdabfcd49e51511c46d62d98a6a8cdcd821467c3f3643848eaa95095303bb71f0943f66f4e46eea66659b83ba841df4eba10d273eddb730a1f; path=/; domain=xxxxxx.xxx.xxx.xx Accept-Encoding: gzip, deflate, br From: bingbot(at)microsoft.com User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36 X-Forwarded-For: 40.77.167.70 has context menu

The request is getting blocked may be because of samesite policy or some special characters. Do you guys have any idea on this? In mean time we are trying to different ways but your insights might be helpful.

We are facing this ABP 5 version not sure it will be there in latest versions or not but for now we cant upgrade.

Showing 1 to 10 of 320 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 16, 2025, 11:47