antosubash / blog-comments

MIT License
0 stars 0 forks source link

posts/netcore-microservice-with-abp-add-new-service-part-11 #17

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Add New Service - .NET Microservice with ABP - Part 11

In this post we will see how to add docker support and create a CI/CD with github actions

https://blog.antosubash.com/posts/netcore-microservice-with-abp-add-new-service-part-11

SooRaj-1994 commented 2 years ago

I created a microservice app using abp framework with your video. Can I use ICurrentUser in all my microservice to get the Current User details. While I was using it in Identity service it gave me the Current user but when I used it in other services it became null. How can I get the current user in my services.

SooRaj-1994 commented 2 years ago

I have created a application based on your instructions and added a new service. Then I tried to get the current user but an exception occurred.

Exception:

Failed to validate the token. Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'System.String'. Did not match: validationParameters.ValidAudience: 'System.String' or validationParameters.ValidAudiences: 'System.String'.

Can you please help me to solve the issue?

antosubash commented 2 years ago

@SooRaj-1994 it seems like the Identity server is not reachable. That is the audience. you can use ICurrentUser in all the AppService. Just make sure JWT Configuration is properly configured.

SooRaj-1994 commented 2 years ago

Thank you very.

Acollty commented 2 years ago

I followed the script in Chapter 11 to create a new service, but the output of the powershell script has been incorrect. The code I executed is as follows: .\newservice.ps1 product, but the initial capitalization is incorrect and the returned format is as follows: Project._product.Groups1.Value.ToUpper_roductService.HttpApi.Host\Playbor._product.Groups1.Value.ToUpper_roductService. HttpApi.Host.csproj" Please tell me what is the reason for this?

BahaaEbraheem commented 1 year ago

If I request data from the Blazor application, it gives me this error

This_console_error:7 fail: Tasky.Blazor.Pages.Currencies.Currencies[0] Could not found remote action for method: System.Threading.Tasks.Task1[Volo.Abp.Application.Dtos.PagedResultDto1[Tasky.CurrencyService.Currencies.CurrencyDto]] GetListAsync(Tasky.CurrencyService.Currencies.CurrencyPagedAndSortedResultRequestDto) on the URL: https://localhost:7500 Volo.Abp.AbpException: Could no

antosubash commented 1 year ago

@BahaaEbraheem It seems like you have a new Currencies service and Yapr doesn't know about it. make sure yarp knows about all the services.

BahaaEbraheem commented 1 year ago

Thank you for your interest in answering me I want to send you the application link on the Github BahaaEbraheem/AbpMicroservice-Blazor (github.com) https://github.com/BahaaEbraheem/AbpMicroservice-Blazor And I want you to find out what's wrong with me in gateway app in appsettings.json file I apologize because I did not understand how I should be forced, Yarp , to know the new service

‫في الاثنين، 17 أبريل 2023 في 11:00 ص تمت كتابة ما يلي بواسطة ‪Anto Subash‬‏ @.***‬‏>:‬

@BahaaEbraheem https://github.com/BahaaEbraheem It seems like you have a new Currencies service and Yapr doesn't know about it. make sure yarp knows about all the services.

— Reply to this email directly, view it on GitHub https://github.com/antosubash/blog-comments/issues/17#issuecomment-1510881101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUSRM6T2BZBETUVJGDID7S3XBT2BJANCNFSM53KZQP2Q . You are receiving this because you were mentioned.Message ID: @.***>

BahaaEbraheem commented 1 year ago

I want to show the currencies on a Tasky.Blazor Application and full crud - page I couldn't do that

‫في الاثنين، 24 أبريل 2023 في 4:16 م تمت كتابة ما يلي بواسطة ‪bahaa Ebraheem‬‏ @.***‬‏>:‬

Thank you for your interest in answering me I want to send you the application link on the Github BahaaEbraheem/AbpMicroservice-Blazor (github.com) https://github.com/BahaaEbraheem/AbpMicroservice-Blazor And I want you to find out what's wrong with me in gateway app in appsettings.json file I apologize because I did not understand how I should be forced, Yarp , to know the new service

‫في الاثنين، 17 أبريل 2023 في 11:00 ص تمت كتابة ما يلي بواسطة ‪Anto Subash‬‏ @.***‬‏>:‬

@BahaaEbraheem https://github.com/BahaaEbraheem It seems like you have a new Currencies service and Yapr doesn't know about it. make sure yarp knows about all the services.

— Reply to this email directly, view it on GitHub https://github.com/antosubash/blog-comments/issues/17#issuecomment-1510881101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUSRM6T2BZBETUVJGDID7S3XBT2BJANCNFSM53KZQP2Q . You are receiving this because you were mentioned.Message ID: @.***>

jamajama1 commented 1 year ago

Who else is having issues running the script for "Create service script". First I get an error for code signing and then there are a few errors for "Get-ChildItem : Could not find item" when recursively remove files.

capta1n-l3n1n commented 1 year ago

I followed the script in Chapter 11 to create a new service, but the output of the powershell script has been incorrect. The code I executed is as follows: .\newservice.ps1 product, but the initial capitalization is incorrect and the returned format is as follows: Project._product.Groups1.Value.ToUpper_roductService.HttpApi.Host\Playbor._product.Groups1.Value.ToUpper_roductService. HttpApi.Host.csproj" Please tell me what is the reason for this?

I followed the script in Chapter 11 to create a new service, but the output of the powershell script has been incorrect. The code I executed is as follows: .\newservice.ps1 product, but the initial capitalization is incorrect and the returned format is as follows: Project._product.Groups1.Value.ToUpper_roductService.HttpApi.Host\Playbor._product.Groups1.Value.ToUpper_roductService. HttpApi.Host.csproj" Please tell me what is the reason for this?

This work for me In the newservice change $pascalCase to below $pascalCase = $serviceNameInput.Substring(0, 1).ToUpper() + $serviceNameInput.Substring(1)