Base solution for your next web application

Activities of "KPCS"

Please provide the link to download Metronic v7.x

Hi,

We are facing following issues when trying to use "Navigation Property" feature issue:

1. After selection of Base entity User then "Display Property" field drop down is showing "Name" only though we want to show UserName. How can we do this.

2. We have created a new entity "Address" which has properties "Address Line 1,  Address Line 2, City, Country" etc. This entity is created through power tool. We need to map this entity with another table as a foreign key. So went to  "Navigation Property" tab of power tool and selected Address entity and want to select multiple properties  "Address Line 1,  Address Line 2, City, Country" in "Display Property" field drop down. How can we do this.

3. One entity has multiple foreign keys and all foreign keys are linked with one table column with different names. We would like to display all different names in aspnet zero UI. How can we do this.

Please guide us to solve above issues.

Thanks,

Kind Regfards, Kumar Prashant

Hi,

We are trying to integrate an Elsa workflow in asp.net zero application (Version 9.0.1) but Elsa dashboard is throwing following error.

Error:

Mvc.ExceptionHandling.AbpExceptionFilter - Unable to cast object of type 'Castle.Proxies.SessionAppServiceProxy' to type 'Microsoft.AspNetCore.Mvc.Controller'.
System.InvalidCastException: Unable to cast object of type 'Castle.Proxies.SessionAppServiceProxy' to type 'Microsoft.AspNetCore.Mvc.Controller'.
   at Elsa.Dashboard.ActionFilters.NotifierFilter.OnActionExecuted(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Above error comes when we add services.AddElsaDashboard() in the startup file. Please see below code block.

Web.Host/startup/startup.cs

public IServiceProvider ConfigureServices(IServiceCollection services)
{
//MVC
services.AddControllersWithViews(options =>
{
options.Filters.Add(new AbpAutoValidateAntiforgeryTokenAttribute());
}).AddNewtonsoftJson();

services.AddSignalR();

// Elsa Workflow basic configuration
services.AddElsa();
services.AddHttpActivities(options => options.Bind(appConfiguration.GetSection("Elsa:Http")));
services.AddEmailActivities(options => options.Bind(appConfiguration.GetSection("Elsa:Smtp")));
services.AddTimerActivities(options => options.Bind(_appConfiguration.GetSection("Elsa:Timers")));

// Add services used for the workflows dashboard.
services.AddElsaDashboard();***

Please help me on this issue

Thanks,

Kind Regards, Kumar Prashant

Hi,

As per the above suggestion I created a sample project and integrated Elsa Workflow But same error occured.

Sample Project link is:

https://drive.google.com/file/d/1xC7vvPGqSFWonjgMl3m2mh7TwwdghXRe/view?usp=sharing Elsa Integration documentation link : https://docs.google.com/document/d/16UjD9yQc1zQH7md4XLh-iPgjA12q62zWw_SXGwl8hMI/edit?usp=sharing

Thanks,

Hi Team,

We have implemented the logic given by you but the castle service proxy problem still occurs while we add Elsa dashboard in a startup file.

Please guide us or send us the sample code where ELSA dashboard is implemented.

Thank you

Hi Team,

Thank you for the code. While setting up the code we have recorded following observations.

Observation 1 : Steps :

  1. Setup database for Elsa Workflow and my project database
  2. Then I compile my application and start the IIS server.
  3. Then I redirect to localhost:21021/elsa/home and it's working fine thanks for that.
  4. When I redirect to localhost:4200 that time the pop up window comes up with an error. So for debugging that error I checked my log file.

ERROR :

Mvc.ExceptionHandling.AbpExceptionFilter - Unable to cast object of type 'Castle.Proxies.SessionAppServiceProxy' to type 'Microsoft.AspNetCore.Mvc.Controller'. System.InvalidCastException: Unable to cast object of type 'Castle.Proxies.SessionAppServiceProxy' to type 'Microsoft.AspNetCore.Mvc.Controller'. at Elsa.Dashboard.ActionFilters.NotifierFilter.OnActionExecuted(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

After that, I stop my IIS server and after some time start IIS server again.

Observation 2:

  1. I redirect to localhost:21021/elsa/home it's working fine.
  2. When I redirect to localhost:4200 that time the pop up window comes up with an error. So for debugging that error I checked my log file but at this time "Castle.Proxies.SessionAppServiceProxy" error does not come. Another error come :

ERROR 2020-08-19 21:59:47,166 [11 ] .EntityFrameworkCore.Database.Connection - An error occurred using the connection to database 'KPCSDb' on server 'localhost'. ERROR 2020-08-19 21:59:47,468 [11 ] Microsoft.EntityFrameworkCore.Query - An exception occurred while iterating over the results of a query for context type 'Elsa.Persistence.EntityFrameworkCore.DbContexts.SqlServerContext'. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync() System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync()

I think at the login screen application confuse about which database to use. Please let us know howcan we resolve this issue

Hi,

We are using ASPNet Zero version 9.0.0, Project ASPNet Core and Angular, Server Azure

Website "https://kpcsv9qa.azurewebsites.net" is working fine and redirecting it to "https://kpcsv9qa.azurewebsites.net/account/login" page.

But when we directly type URL "https://kpcsv9qa.azurewebsites.net/account/login" on the browser or refresh the page then website is throwing "404 Not Found" error.

We used the link https://support.aspnetzero.com/QA/Questions/7787 and made changes in web.config file but it did not help us.

Please let us know the solution for this.

Thank you

Kind Regards, Kumar Prashant

Hi,

We checked on ELSA roadmap and it seems to be slow in evolving. Due to this issue "Mvc.ExceptionHandling.AbpExceptionFilter - Unable to cast object of type 'Castle.Proxies.SessionAppServiceProxy' to type 'Microsoft.AspNetCore.Mvc.Controller'." is not fixed yet on release.

Which other workflow engine have you seen integrating effectively with ASPNetZero?

Thnaks,

Kind Regards, Kumar Prashant

Hi,

While integrating elsa in ASPNetZero we are getting an error. We are using following steps to setup ESLA. Please help us on solving this issue.

Steps :

  1. Added the latest Elsa package on the Web.Host Elsa Elsa.Dashboard Elsa.Persistence.EntityFrameworkCore

  2. Added Elsa home controller call in a KPCSWebHostModule public override void Initialize() { IocManager.RegisterAssemblyByConvention(typeof(ElsaProjectWebHostModule).GetAssembly());

     Register(typeof(Elsa.Dashboard.Areas.Elsa.Controllers.HomeController).GetAssembly());
     Register(typeof(Elsa.WorkflowDesigner.ViewComponents.WorkflowDesignerViewComponent).GetAssembly());
    

    }

    private void Register(Assembly assembly) { //Controller IocManager.IocContainer.Register( Classes.FromAssembly(assembly) .BasedOn<Controller>() .If(type => !type.GetTypeInfo().IsGenericTypeDefinition && !type.IsAbstract) .LifestyleTransient() );

     //Razor Pages
     IocManager.IocContainer.Register(
     	Classes.FromAssembly(assembly)
     		.BasedOn&lt;PageModel&gt;()
     		.If(type => !type.GetTypeInfo().IsGenericTypeDefinition && !type.IsAbstract)
     		.LifestyleTransient()
     );
    
     //ViewComponents
     IocManager.IocContainer.Register(
     	Classes.FromAssembly(assembly)
     		.BasedOn&lt;ViewComponent&gt;()
     		.If(type => !type.GetTypeInfo().IsGenericTypeDefinition)
     		.LifestyleTransient()
     );
    

    }

  3. Database call in a startup file

    services // Add services used for the workflows runtime. .AddElsa(elsa => elsa.AddEntityFrameworkStores<SqlServerContext>(options => options.UseSqlServer(@"Server=localhost;Database=SampleElsaDb;User=sa;Password=Local;")))

    // Add services used for the workflows dashboard. .AddElsaDashboard();

4: Error

ERROR 2020-11-04 17:53:20,889 [13 ] Mvc.ExceptionHandling.AbpExceptionFilter - Method not found: 'System.__Canon AutoMapper.IMapper.Map(System.Object)'. System.MissingMethodException: Method not found: 'System.__Canon AutoMapper.IMapper.Map(System.Object)'. at Abp.AutoMapper.AutoMapperObjectMapper.Map[TDestination](Object source) at KPCS.Sessions.SessionAppService.GetCurrentLoginInformations() in F:\ESOP\src\RuleEngine\KPCS\KPCS\src\KPCS.Application\Sessions\SessionAppService.cs:line 74 at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

Question

Hi Support Team,

We want to develop a re-usable component which will have its own Angular UI Pages/Components, Database Tables and Services, which can be shared across different AspNetZero applications.

In that, can the AspNetZero Plugin approach be used? (ref link https://aspnetboilerplate.com/Pages/Documents/Plugin ) Can the plugin contain an entire set of Modules similar to a typical AspNetZero application, like - DB Migration, EF, Services, Web.Core, Web.Host etc. on the service side? As well as, can the angular UI part of this module code be part of this Plugin.

Link 1) https://aspnetboilerplate.com/Pages/Documents/Module-System looks like limited to service classes only.

Waiting for your quick response.

Thanks,

Kind Regards, Kumar Prashant

Showing 1 to 10 of 37 entries