I am trying to test Multi-Tenancy in the new module i just created. I am able to get the token and I can see the __tenantId being passed in the header. I put a logger in the module to check the TenantId and its always coming null
public class SampleController : VendorManagementController, ISampleAppService
{
private readonly ISampleAppService _sampleAppService;
private readonly ILogger<SampleController> _logger;
public SampleController(ISampleAppService sampleAppService, ILogger<SampleController> logger)
{
_sampleAppService = sampleAppService;
_logger = logger;
}
[HttpGet]
public async Task<SampleDto> GetAsync()
{
if (CurrentTenant.Id.HasValue)
_logger.LogInformation("TenantId :" + CurrentTenant.Id);
else
_logger.LogInformation("TenantId is null");
return await _sampleAppService.GetAsync();
}
[HttpGet]
[Route("authorized1")]
[Authorize]
public async Task<SampleDto> GetAuthorizedAsync()
{
return await _sampleAppService.GetAsync();
}
}
I also tried to use Swagger and no success Can you help me understand how I can get the TenantId properly, is there any settings I need to switch on or something
Nuget Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:
' Error NU1101: Unable to find package Volo.Abp.Commercial.Core. No packages exist with this id in source(s): nuget.abp.io, nuget.org. PackageSourceMapping is enabled'
I have all the proper Nuget.Config, in fact this was working few days back , now for the last 5 hours this has not been working. I am using Azure Devops Pipelines.
I need to understand how reliable the communication and package availability is in nuget.abp.io
I am creating a module for my microservice. When I add a module to my micrioservice and run the swagger the Swagger shows the end points defined in the mdoule controller .httpapi project.
However i want to use my application service(.Application project) as my end points and show it in swagger instead of the picking form the controller. I was going through this article : https://abp.io/docs/latest/framework/api-development/auto-controllers however its asking to make changes to the WebModule which I don't have it. So where should I make this change and in which project so that the swagger starts picking up from the Application module instead of controller