Activities of "ricardo.carvalho"

Hi. I created a new solution for my Main project and now I'm trying to add a new Module to it. My solution uses Angular and I'm creating the new module with --no-ui so that I can then create the Angular modules separate.

I added the new module to a sub-folder of the solution and added Existing Project to the main solution like it was suggested in https://support.abp.io/QA/Questions/3 below.

Hi,

Every module can be a separate solution (like we did for the modules) or you can develop it under a single Visual Studio solution (for example, in the microservice demo, we've included a product module into the solution).

I suggest you to go with a single solution at the beginning since it is easier to develop, test, run and maintain. You know, in a single solution, you can cross reference projects. Assuming you will create your module as layered (like this), your application's domain layer should depend on the module's domain layer and so on (as a good practice, but you don't have to do). Also, add standard DependsOn attribute (see the document) when you add a project reference.

You can create a new module (using abp new MyProductName.MyModuleName -t module-pro - see), then add its projects to the application's solution then add references and dependson attributes. In the future, we will also automate this.

For the UI part, you can investigate the Angular UI modules we've created to understand how a module is developed. We are using them as NPM packages in the main application, however it may not be practical in development. @mehmet can write you more about that.

My solution now has the following structure.

I then went to the main Gmcs.Themis.HttpApi.Host and added the depends on the new module

Everything compiles and Runs, and the new methods for the Module display in Swagger but when i try to execute it fails and the following error is added to the Log.

2020-03-30 15:30:44.137 +01:00 [INF] Request starting HTTP/1.1 GET https://localhost:44338/api/ScreenBuilder/sample
2020-03-30 15:30:44.142 +01:00 [INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed 2020-03-30 15:30:44.142 +01:00 [DBG] AuthenticationScheme: Bearer was not authenticated. 2020-03-30 15:30:44.144 +01:00 [INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed 2020-03-30 15:30:44.144 +01:00 [INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed 2020-03-30 15:30:44.148 +01:00 [INF] Executing endpoint 'Gmcs.Themis.ScreenBuilder.Samples.SampleController.GetAsync (Gmcs.Themis.ScreenBuilder.HttpApi)' 2020-03-30 15:30:44.150 +01:00 [INF] Route matched with {action = "Get", controller = "Sample", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Gmcs.Themis.ScreenBuilder.Samples.SampleDto] GetAsync() on controller Gmcs.Themis.ScreenBuilder.Samples.SampleController (Gmcs.Themis.ScreenBuilder.HttpApi). 2020-03-30 15:30:44.153 +01:00 [ERR] ---------- RemoteServiceErrorInfo ---------- 2020-03-30 15:30:44.154 +01:00 [ERR] { "code": null, "message": "An internal error occurred during your request!", "details": null, "validationErrors": null } 2020-03-30 15:30:44.154 +01:00 [ERR] An exception was thrown while activating Castle.Proxies.SampleControllerProxy. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.SampleControllerProxy. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Castle.Proxies.SampleControllerProxy' can be invoked with the available services and parameters: Cannot resolve parameter 'Gmcs.Themis.ScreenBuilder.Samples.ISampleAppService sampleAppService' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], Gmcs.Themis.ScreenBuilder.Samples.ISampleAppService)'. at Autofac.Core.Activators.Reflection.ReflectionActivator.GetValidConstructorBindings(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters, Object& decoratorTarget) --- End of inner exception stack trace --- at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters, Object& decoratorTarget) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.

What an I missing?

Another option is, does anyone have a sample solution with more than one module being used using Angular?

... Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swaggergen/index.json'. Response status code does not indicate success: 302 (Found). Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/microsoft.openapi/index.json'. Response status code does not indicate success: 302 (Found). Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swaggerui/index.json'. Response status code does not indicate success: 302 (Found). Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swagger/index.json'. Response status code does not indicate success: 302 (Found). Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/microsoft.aspnetcore.authentication.jwtbearer/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swaggergen/index.json GET https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swagger/index.json GET https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swaggerui/index.json GET https://nuget.abp.io/****75/v3/package/microsoft.openapi/index.json GET https://nuget.abp.io/****75/v3/package/microsoft.aspnetcore.authentication.jwtbearer/index.json GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.authentication.jwtbearer/3.1.0/microsoft.aspnetcore.authentication.jwtbearer.3.1.0.nupkg OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.authentication.jwtbearer/3.1.0/microsoft.aspnetcore.authentication.jwtbearer.3.1.0.nupkg 16ms OK https://nuget.abp.io/****75/v3/package/volo.abp.account.pro.public.web/index.json 147ms GET https://nuget.abp.io/****75/v3/package/volo.abp.account.pro.public.web/2.3.0/volo.abp.account.pro.public.web.2.3.0.nupkg Redirect https://nuget.abp.io/****75/v3/package/microsoft.openapi/index.json 120ms Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/microsoft.openapi/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/microsoft.openapi/index.json Redirect https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swagger/index.json 125ms Redirect https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swaggergen/index.json 130ms Redirect https://nuget.abp.io/****75/v3/package/microsoft.aspnetcore.authentication.jwtbearer/index.json 133ms Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/microsoft.aspnetcore.authentication.jwtbearer/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/microsoft.aspnetcore.authentication.jwtbearer/index.json Redirect https://nuget.abp.io/****75/v3/package/swashbuckle.aspnetcore.swaggerui/index.json 159ms OK https://nuget.abp.io/****75/v3/package/volo.abp.account.pro.public.web/2.3.0/volo.abp.account.pro.public.web.2.3.0.nupkg 144ms Redirect https://nuget.abp.io/****75/v3/package/microsoft.openapi/index.json 117ms Redirect https://nuget.abp.io/****75/v3/package/microsoft.aspnetcore.authentication.jwtbearer/index.json 118ms GET https://api.nuget.org/v3-flatcontainer/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json GET https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json GET https://api.nuget.org/v3-flatcontainer/volo.abp.identity.aspnetcore/index.json GET https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json NotFound https://api.nuget.org/v3-flatcontainer/volo.abp.account.pro.public.web/index.json 411ms Redirect https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json 143ms Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json OK https://api.nuget.org/v3-flatcontainer/volo.abp.identity.aspnetcore/index.json 154ms GET https://api.nuget.org/v3-flatcontainer/volo.abp.identity.aspnetcore/2.3.0/volo.abp.identity.aspnetcore.2.3.0.nupkg OK https://api.nuget.org/v3-flatcontainer/volo.abp.identity.aspnetcore/2.3.0/volo.abp.identity.aspnetcore.2.3.0.nupkg 20ms Redirect https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json 195ms Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json Redirect https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json 126ms Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json Redirect https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json 120ms Retrying 'FindPackagesByIdAsync' for source 'https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json'. Response status code does not indicate success: 302 (Found). GET https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json Redirect https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json 112ms OK https://api.nuget.org/v3-flatcontainer/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json 430ms Redirect https://nuget.abp.io/****75/v3/package/volo.abp.identity.aspnetcore/index.json 121ms Failed to retrieve information about 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared' from remote source 'https://nuget.abp.io/****75/v3/package/volo.abp.aspnetcore.mvc.ui.theme.shared/index.json'.

Showing 1 to 2 of 2 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07