Starts in:
2 DAYS
3 HRS
56 MIN
59 SEC
Starts in:
2 D
3 H
56 M
59 S

Activities of "hakan.uskaner"

  • ABP Framework version: v5.3.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

I tried this on a new generated microservice-template..: Stepts to reproduce:

  • generate a microservice solution: abp new AppMicro -t microservice-pro -u blazor-server -csf
  • run solution with powershell .\run-tye.ps1
  • open product service api and authenticate with WebGateway_Swagger account
  • Try a get on products --> this works fine
  • Try to post a new product -> Error 400

I receive this error:

Seems like the antifogery token is not set properly? i also checked permissions in gui and granted WebGateway_Swagger all permissions. No change.

What i am not getting here ~ ?

Answer

"app.UseCors();" was missing in the NewServiceHttpApiHostModule in OnApplicationInitialization.

After adding it ,it works. Seems to be an issue in abp-cli.

Hi @gterdem,

yes indeed "app.UseCors();" was missing in the NewServiceHttpApiHostModule in OnApplicationInitialization. Seems to be an error in generation through abp-cli. but this did resolve it..

I thank you. I needed that fix. When will that be fixed in cli ?

Answer

I have the same error, please look here: https://support.abp.io/QA/Questions/3310/Howto-integrate-a-standard-template-pro-solution-as-new-service-in-a-microservice-solution

I did try to add my newservice to all appsettings, without success. i also did replace the port number of product-service with my new service in ocelot.json without success. so from my point liangshiwei advise didn't work for me

Hi,

till now i dont got any solution for this. Cors gives the error for the new service but i didn't any differerence to product service. The cors setting is exactly the same in appsettings.

I hope the support team will solve this for us. I need this fixed.

  • your document "https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice" contain infos about the internal gateway and project reference which doesn't exist anymore, this one needs an update

  • if i try to follow you document how to change to mongodb. i receive a lot of errors in vs

  • The Port 44325 is port of the WebGateway, The Port 44472 is the port of my new microservice. I also receive this error on the PublicWebGateway which runs at Port 44353. Both Gateways are added to the new microservice appsettings Cors configuration per default. Also if i open the new microservice page in tye directly (https://localhost:44472) . it works fine but not if try to access it over an gateway. I did follow also the section about the gateways in your microservcice document any didn't find any difference.

I did reproduce it with these steps:

  • generate microservice: abp new AppMicro -t microservice-pro -u blazor-server -csf
  • abp new AppZero -t microservice-service-pro
  • follow gatway document to add it.
  • Start tye and test the new microservice appzero directly .. it will work. try to access it over one gateway. i do get the same error.

Yes here is one issue. I did follow your document "Add a new microservice to solution". I can reach my added new Service per Swagger on localhost port 44472. Thats site works.

But i get an error on both gateways if i try to select my new service, that it failed to fetch due Cors Origin:

Fetch error Failed to fetch https://localhost:44472/swagger/v1/swagger.json

Fetch error Possible cross-origin (CORS) issue? The URL origin (https://localhost:44472) does not match the page (https://localhost:44325). Check the server returns the correct 'Access-Control-Allow-*' headers.

I did double check the product service and compared with my new services. But i didn't find any differences so far.

  • Your document doesn't seem to be updated to 5.3.. There is no internal gateway, and the other gateways do not rely anymore on a project reference for the HttpApi Projects. I did update ocelot.json, the specific Module.cs, but still get the error.

  • Your document "Change Microservice project to use MongoDB Provider" changes everything to mongo. But i would only add one additional service with mongo. There is a difference , that both Migrations and Checker must work at same time.. and the document doesn't describe that clearly. I did look at eshoponabp and it a looks a bit different.

What can i do for the gateways to acceppt my new service `??

Maybe you could share a complete microservice-template-pro example based on mongdb with me.?

I was able to fix it my own by follwing these steps:

  • i did stop all docker container and removed alle volumes: docker volume prune -f
  • i uninstalled abp-cli and suite
  • i did remvoe the .abp folder from %userprofie%
  • i did remove within the .nuget folder from %userprofile% all Volo Packages
  • i reinstalled abp-cli and suite
  • i generated a new microservice-template like above

I am not sure what was the right step.. but now it works. please refund that credit

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.0
  • UI type: Blazor-Server
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes /
  • Exception message and stack trace:

AppMicro.PublicWeb terminated unexpectedly! System.TypeLoadException: Could not load type 'Volo.Abp.IAsyncInitialize' from assembly 'Volo.Abp.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) at System.Reflection.RuntimeConstructorInfo.<get_Signature>g__LazyCreateSignature|19_0() at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy() at System.Reflection.RuntimeConstructorInfo.GetParameters() at Autofac.Core.Activators.Reflection.ConstructorBinder..ctor(ConstructorInfo constructorInfo) at Autofac.Core.Activators.Reflection.ReflectionActivator.ConfigurePipeline(IComponentRegistryServices componentRegistryServices, IResolvePipelineBuilder pipelineBuilder) at Autofac.Core.Registration.ComponentRegistration.BuildResolvePipeline(IComponentRegistryServices registryServices, IResolvePipelineBuilder pipelineBuilder) at Autofac.Core.Registration.ComponentRegistration.BuildResolvePipeline(IComponentRegistryServices registryServices) at Autofac.Core.Registration.ComponentRegistryBuilder.Build() at Autofac.ContainerBuilder.Build(ContainerBuildOptions options) at Volo.Abp.Autofac.AbpAutofacServiceProviderFactory.CreateServiceProvider(ContainerBuilder containerBuilder) at Microsoft.Extensions.Hosting.Internal.ServiceFactoryAdapter`1.CreateServiceProvider(Object containerBuilder) at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider() at Microsoft.Extensions.Hosting.HostBuilder.Build() at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build() at AppMicro.PublicWeb.Program.Main(String[] args) in D:\repos\AppMicro\apps\public-web\src\AppMicro.PublicWeb\Program.cs:line 28

  • Steps to reproduce the issue:"
  1. Generate a new microservice solution with: abp new AppMicro -t microservice-pro -u blazor-server

  2. start infrastructure with powershell ./up.ps1

  3. tye run and check logs for Blazor and Public-web. Both contain same error :

    Could not load type 'Volo.Abp.IAsyncInitialize' from assembly 'Volo.Abp.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null'.

Was it removed in 5.3 without updating the microservice template. or where is my mistake ?

I know that a pro template is not a microservice. But i want to move the relevant parts from pro template solution to a new microservice .. Thats why asked for a guide.. I think its a valid option for moving towards a microservice solution

Showing 31 to 40 of 82 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06