Base solution for your next web application
Open Closed

Error occurs while implementing store procedure in ASP .NET zero project. #9088


User avatar
0
shedspotter created

I have tried implementing below suggested solution.

[https://aspnetboilerplate.com/Pages/Documents/Articles/Using-Stored-Procedures,-User-Defined-Functions-and-Views/index.html]

But i am getting error "An internal error occurred during your request!".

I am attaching below my sample code.

Please suggest the solution.

Thanks in advance

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    An internal error occurred during your request

    What is the detailed error stack?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    shedspotter created

    Hi maliming,

    Thanks for response.

    As you told me to describe in detail about internal error, but i am not sure i can give you detail. because the error i am getting on swagger in API & debug point does not hit on the "TaskAppService" service and also does not hit on base service which is "SmartSuiteAppServiceBase".

    Kindly revert back if you understand the issue.

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @shedspotter,

    You can find the detailed error message in App_Data/Logs/Logs.txt under your web project.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    shedspotter created

    Hi @ismacagdas

    Thanks, Detail error mention below Please suggest changes for implementing store procedure.

    INFO 2020-06-01 11:37:54,162 [11 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/2.0 GET https://localhost:44301/api/services/app/Task/GetTasks
    INFO 2020-06-01 11:37:54,176 [11 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'SmartSuite.BoardTask.TaskAppService.GetTasks (SmartSuite.Application)' INFO 2020-06-01 11:37:54,183 [11 ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetTasks", controller = "Task"}. Executing controller action with signature System.Threading.Tasks.Task1[System.Collections.Generic.List1[SmartSuite.BoardTask.BoardTasks]] GetTasks() on controller SmartSuite.BoardTask.TaskAppService (SmartSuite.Application). ERROR 2020-06-01 11:37:59,060 [11 ] Mvc.ExceptionHandling.AbpExceptionFilter - Can't create component 'SmartSuite.BoardTask.TaskAppService' as it has dependencies to be satisfied.

    'SmartSuite.BoardTask.TaskAppService' is waiting for the following dependencies:

    • Service 'SmartSuite.BoardTask.ITaskRepository' which was not registered.

    Castle.MicroKernel.Handlers.HandlerException: Can't create component 'SmartSuite.BoardTask.TaskAppService' as it has dependencies to be satisfied.

    'SmartSuite.BoardTask.TaskAppService' is waiting for the following dependencies:

    • Service 'SmartSuite.BoardTask.ITaskRepository' which was not registered.

      at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency() at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext) 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) INFO 2020-06-01 11:38:02,078 [11 ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'. INFO 2020-06-01 11:38:02,101 [11 ] c.Infrastructure.ControllerActionInvoker - Executed action SmartSuite.BoardTask.TaskAppService.GetTasks (SmartSuite.Application) in 7918.4223ms INFO 2020-06-01 11:38:02,101 [11 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'SmartSuite.BoardTask.TaskAppService.GetTasks (SmartSuite.Application)' INFO 2020-06-01 11:38:02,102 [11 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 7940.188ms 500 application/json; charset=utf-8

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    maliming created
    Support Team

    hi shedspotter

    Try to rename BoardRepository to TaskRepository.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    shedspotter created

    Hi @maliming,

    Thanks for solution Working now :)

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)