Base solution for your next web application

Activities of "lschelvan"

I just downloaded the new 12.4.0 version. (Angular + .NET core)

Using VS2022 17.7.0 I get this when building Web.Host

There are also a couple of errors when building the MAUI project (I ignored them because we're not yet developing the mobile project).

If it helps, we are planning to upgrade from AspNetZero 11.4 to 12.4 in the next couple of weeks...

Woops I didn't mean to close this. The Castle Windsor DI issue is still an problem and I have not yet figured out how to get around it.

It was in PreInitialize()

Yes, I have tried this in the web module code IocManager.Register(typeof(WebDocumentViewerController), DependencyLifeStyle.Transient); IocManager.Register(typeof(QueryBuilderController), DependencyLifeStyle.Transient); IocManager.Register(typeof(ReportDesignerController), DependencyLifeStyle.Transient);

and also tried in Startup (using the code in the previous message).

Thank you.

I was able to get past the Swashbuckle issue and get the routing working by adding custom classes for the DevExpress controllers, as follows:

`ApiExplorerSettings(IgnoreApi = true)]
 [Route("DXXRDV")]
  
 public class CustomWebDocumentViewerController : WebDocumentViewerController
 {
     public CustomWebDocumentViewerController(IWebDocumentViewerMvcControllerService controllerService) : base(controllerService) { }
     public override Task<IActionResult> Invoke()
     {
         return base.Invoke();
     }
 }

`

The main problem I'm now having (in the MVC Core Web.Host) is related to dependency injection:

`An unhandled exception occurred while processing the request.
ComponentNotFoundException: No component for supporting the service MyApp.Web.Controllers.CustomWebDocumentViewerController was found
Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, bool ignoreParentContext)

ComponentNotFoundException: No component for supporting the service MyApp.Web.Controllers.CustomWebDocumentViewerController was found
Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, bool ignoreParentContext)
Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, bool isOptional)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)`

This error has been reported by a few other users. I've tried implementing various fixes but still get the same Castle error.

For example, I'm doing this (as described in https://aspnetzero.com/blog/devexpress-reporting-angular )

` options.IocManager.Register(typeof(WebDocumentViewerController), DependencyLifeStyle.Transient);
 options.IocManager.Register(typeof(QueryBuilderController), DependencyLifeStyle.Transient);
 options.IocManager.Register(typeof(ReportDesignerController), DependencyLifeStyle.Transient);`

Unfortunately, that makes no difference.

If there's anybody who's successfully integrated DevExpress Reporting (23.1.5) with AspNetZero (11.3, .NET Core + Angular), I am very interested to know how you got it working....

I've followed this process : https://docs.aspnetzero.com/en/aspnet-core-angular/latest/DevExpress-Reporting-Implementation-Angular

But this throws an exception referencing WebDocumentViewerController, because DevExpress has recently made their controller classes abstract: https://supportcenter.devexpress.com/ticket/details/t1019255/reporting-for-asp-net-core-blazor-server-the-report-designer-web-document-viewer-and

Following their recommended procedure, I've added the explicit controller classes.

But doing this breaks my Web.Host app during Swagger generation:

An unhandled exception occurred while processing the request. SwaggerGeneratorException: Ambiguous HTTP method for action - MyApp.Web.Controllers.CustomQueryBuilderController.Invoke (MyApp.Web.Host). Actions require an explicit HttpMethod binding for Swagger/OpenAPI 3.0 Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable<ApiDescription> apiDescriptions, SchemaRepository schemaRepository)

new SettingDefinition( AppSettings.WMS.InventoryStockViewSettings.InventoryLotGroupBy, GetFromAppSettings(AppSettings.WMS.InventoryStockViewSettings.InventoryLotGroupBy, "false"), scopes: SettingScopes.User, isVisibleToClients: true, isEncrypted:false),

Here's the definition. We have several other similar settings that are being read in the same manner, and they exhibit the same caching behavior.

public bool? InventoryLotGroupBy { get; set; } = false;

Currently there is only 1 instance.

Showing 11 to 20 of 30 entries