Open Closed

Not able to get CurrentUser details in new service added into Microservice architecture #3621


User avatar
0
lalitChougule created
  • ABP Framework version: v4.4.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no / yes
  • Exception message and stack trace: N.A
  • Steps to reproduce the issue:" N.A

Hi,

I have added new Micro-Service into my Microservice architecture application solution. For CurrentUser I can only get phone number field For CurrentTenant I can only get the Id

[Authorize]
public Task<SampleDto> GetAuthorizedAsync()
{
	var user = CurrentUser.UserName;
	var tenant = CurrentTenant.Id;

	return Task.FromResult(
		new SampleDto
		{
			Value = 42
		}
	);
}

FYI

  • I create new module with command abp new XXX.XXXX.XXXXX -t module-pro -csf --no-ui -dbms PostgreSQL -v 4.4.4
  • Copied all newly created modules in my solution.
  • For existing module I am able to see Volo.Abp.IdentityServer.Application in the .csproj file of Application project, but for my newly created project this package was not installed and also when I tried to install this package I am not able to find it on nuget package manager ( Image for your reference below ) and when I tried editing the .csproj and try to add it there, this package is not getting resolved. i.e. Volo.Abp.IdentityServer.Application

Thanks!!!


6 Answer(s)
  • User Avatar
    0
    lalitChougule created

    Hi,

    Could you please reply to this question ?

  • User Avatar
    0
    lalitChougule created

    ??

  • User Avatar
    0
    alper created
    Support Team Director

    sorry for the late response @gterdem will help you

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    I create new module with command abp new XXX.XXXX.XXXXX -t module-pro -csf --no-ui -dbms PostgreSQL -v 4.4.4

    Module templates and microservice templates are different. You should follow https://docs.abp.io/en/commercial/6.0/startup-templates/microservice/add-microservice guide to add a new microservice to your microservice solution.

    Try the guide above and let me know if you still have problems.

  • User Avatar
    0
    lalitChougule created

    @gterdem

    Our solution structure is bit different as compared to your microservice template. This application was create way before abp.io Micro service template came into picture. We connected with abp.io at times of creation of our application, it was created manually by guidance of abp.io support team only.

    Can we please connect and have a look yourself as giving you sample source is not possible and we cannot provide you original source code as well.

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Can you email to galip.erdem@volosoft.com about your available days/hours for a remote session?

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09