Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor'

Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor'_第1张图片

An unhandled exception occurred while processing the request.

InvalidOperationException: Unable to

resolve service for type

'Microsoft.AspNetCore.Http.IHttpContextAccessor' while attempting to

activate ''.

Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type

serviceType, Type implementationType, CallSiteChain callSiteChain,

ParameterInfo[] parameters, bool throwIfCallSiteNotFound)

你可能感兴趣的:(Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor')