-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I realize that this project has not been touched in almost a year but the code as checked in does not seem to run correctly. If I clone the repository and build the solution, I see no errors. However, when I run it and attempt to test out the endpoints (for example, http://localhost:7071/api/GreeterNonScoped) I see the following exception
[01/16/2019 19:41:02] A ScriptHost error has occurred
[01/16/2019 19:41:02] Exception while executing function: GreeterNonScoped. Microsoft.Azure.WebJobs.Host: One or more errors occurred. Exception binding parameter 'greeter'. Microsoft.Extensions.DependencyInjection.Abstractions: No service for type 'System.RuntimeType' has been registered.
[01/16/2019 19:41:02] Exception while executing function: GreeterNonScoped
[01/16/2019 19:41:02] Exception while executing function: GreeterNonScoped. Microsoft.Azure.WebJobs.Host: One or more errors occurred. Exception binding parameter 'greeter'. Microsoft.Extensions.DependencyInjection.Abstractions: No service for type 'System.RuntimeType' has been registered.
[01/16/2019 19:41:02] Function completed (Failure, Id=9213ce3b-9c0a-41fe-8e5b-7fc4c25d4e76, Duration=459ms)
[01/16/2019 19:41:02]
[01/16/2019 19:41:02] Executed 'GreeterNonScoped' (Failed, Id=9213ce3b-9c0a-41fe-8e5b-7fc4c25d4e76)
[01/16/2019 19:41:02] mscorlib: Exception while executing function: GreeterNonScoped. Microsoft.Azure.WebJobs.Host: One or more errors occurred. Exception binding parameter 'greeter'. Microsoft.Extensions.DependencyInjection.Abstractions: No service for type 'System.RuntimeType' has been registered.
[01/16/2019 19:41:02] Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is '9213ce3b-9c0a-41fe-8e5b-7fc4c25d4e76'
[01/16/2019 19:41:02] mscorlib: Exception while executing function: GreeterNonScoped. Microsoft.Azure.WebJobs.Host: One or more errors occurred. Exception binding parameter 'greeter'. Microsoft.Extensions.DependencyInjection.Abstractions: No service for type 'System.RuntimeType' has been registered.
[01/16/2019 19:41:03] {"id":"4ef4d78a-4051-420a-85cd-70336fdbec83","requestId":"b4393038-4bb6-4b49-a64a-c6d96a0fa521","statusCode":500,"errorCode":0,"message":"Exception while executing function: GreeterNonScoped -> One or more errors occurred. -> Exception binding parameter 'greeter' -> No service for type 'System.RuntimeType' has been registered.","errorDetails":"Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: GreeterNonScoped ---> System.AggregateException : One or more errors occurred. ---> Exception binding parameter 'greeter' ---> No service for type 'System.RuntimeType' has been registered.\r\n at Microsoft.Azure.WebJobs.Host.Executors.DelayedException.Throw()\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)\r\n---> (Inner Exception #0) System.InvalidOperationException : Exception binding parameter 'greeter' ---> System.InvalidOperationException : No service for type 'System.RuntimeType' has been registered.\r\n at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,Type serviceType)\r\n at async FuncInjector.InjectBinding.BindAsync(??)\r\n at async Microsoft.Azure.WebJobs.Host.Triggers.TriggeredFunctionBinding`1.BindCoreAsync[TTriggerValue](ValueBindingContext context,Object value,IDictionary`2 parameters) \r\n End of inner exception<---\r\n\r\n---> (Inner Exception #1) System.InvalidOperationException : Exception binding parameter 'scoped' ---> System.InvalidOperationException : No service for type 'System.RuntimeType' has been registered.\r\n at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,Type serviceType)\r\n at async FuncInjector.InjectBinding.BindAsync(??)\r\n at async Microsoft.Azure.WebJobs.Host.Triggers.TriggeredFunctionBinding`1.BindCoreAsync[TTriggerValue](ValueBindingContext context,Object value,IDictionary`2 parameters) \r\n End of inner exception<---\r\n \r\n End of inner exception\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)\r\n at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance,CancellationToken cancellationToken)\r\n at Microsoft.Azure.WebJobs.Host.Executors.ExceptionDispatchInfoDelayedException.Throw()\r\n at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??)\r\n at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary`2 arguments,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.Host.FunctionRequestInvoker.ProcessRequestAsync(HttpRequestMessage request,CancellationToken cancellationToken,WebScriptHostManager scriptHostManager,WebHookReceiverManager webHookReceiverManager)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??)\r\n at async Microsoft.Azure.WebJobs.Extensions.Http.HttpRequestManager.ProcessRequestAsync(HttpRequestMessage request,Func`3 processRequestHandler,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ExecuteAsync(HttpControllerContext controllerContext,CancellationToken cancellationToken)\r\n at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)\r\n at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)"}
[01/16/2019 19:41:03] mscorlib: Exception while executing function: GreeterNonScoped. Microsoft.Azure.WebJobs.Host: One or more errors occurred. Exception binding parameter 'greeter'. Microsoft.Extensions.DependencyInjection.Abstractions: No service for type 'System.RuntimeType' has been registered.
I seem to be able to clear the error related to System.RuntimeType not being resolved by upgrading the targeted Framework to 4.7.2 and the NuGet packages to the latest 2.x versions (for example, Microsoft.Azure.WebJobs to 2.3.0) but the issue with greeter not being bound still appears.
Metadata
Metadata
Assignees
Labels
No labels