-
Notifications
You must be signed in to change notification settings - Fork 493
Description
I could deploy my existing ASP.Net Core Web API as lambda. When I tried to invoke the one of the controller methods, I get the below error.
An exception was thrown when the constructor for type '****.*Service.LambdaFunction' was invoked. Check inner exception for more details.: LambdaException
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
Value cannot be null.
Parameter name: assembly: ArgumentNullException
at Microsoft.Extensions.DependencyModel.DependencyContextLoader.Load(Assembly assembly)
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at ****.*Service.Startup.ConfigureServices(IServiceCollection services)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction..ctor()
This WebAPI is working fine with AWS ECS. So I expected it should work fine here too.
Thanks,
Mohan