Base solution for your next web application

Activities of "KPCS"

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 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 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,

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,

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,

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

Please provide the link to download Metronic v7.x

Showing 31 to 37 of 37 entries