无法解析构造函数的参数'Nest.IElasticClient elasticClient'

时间:2019-05-18 13:06:43

标签: elasticsearch .net-core-2.1

在我的项目.net core 2.1中,我使用的是Elasticsearch Nest 7,它正在开发中。但是当将项目发布到服务器时,出现诸如“ 500(内部服务器错误)”的错误。我从服务器错误日志文件中得到了这样的错误:

“发生未处理的异常:激活特定注册时发生错误。有关详细信息,请参见内部异常。注册:Activator = BuildingController(ReflectionActivator),Services = [XonadonUz.Controllers.BuildingController],Lifetime = Autofac .Core.Lifetime.CurrentScopeLifetime,共享=无,所有权= OwnedByLifetimeScope --->使用'XonadonUz.Controllers.BuildingController'类型的'Autofac.Core.Activators.Reflection.DefaultConstructorFinder'找到的所有构造函数都无法使用可用的调用服务和参数:       无法解析构造函数'Void .ctor(XonadonUz.Core.BLL.Services.BuildingService,XonadonUz.Core.BLL.Services.BuildingRoomService,XonadonUz.Core.BLL.Services.SizeNameService,XonadonUz.Core。的参数'Nest.IElasticClient elasticClient'。 BLL.Services.BuildTechnologyService,XonadonUz.Core.BLL.Services.FloorCoveringService,XonadonUz.Core.BLL.Services.MetroKeyService,XonadonUz.Core.BLL.Services.ZoneService,XonadonUz.Core.BLL.Services.ApplianceService,XonadonUzCore BLL.Services.CoolingTypeService,XonadonUz.Core.BLL.Services.HeatingTypeService,XonadonUz.Core.BLL.Services.HeatingFuelService,XonadonUz.Core.BLL.Services.RoomService,XonadonUz.Core.BLL.Services.RoofTypeService,XonadonUz.Core。 BLL.Services.IndoorFeatureService,XonadonUz.Core.BLL.Services.OutdoorAmenityService,XonadonUz.Core.BLL.Services.ViewService,XonadonUz.Core.BLL.Services.ExteriorService,XonadonUz.Core.BLL.Services.ParkingService,XonadonUz.Core。 BLL.Services.BuildTypeService,XonadonUz.Core.BLL.Services.Buil dActionService,Nest.IElasticClient,XonadonUz.Core.BLL.Services.BuildingPhotoService))。 (有关详细信息,请参阅内部异常。)”

我使用了该网站进行Elasticsearch(https://miroslavpopovic.com/posts/2018/07/elasticsearch-with-aspnet-core-and-docker

当我在本地测试时,我找不到开发中的任何错误,它在Elasticsearch上工作得很好,没有任何问题,但是当我发布到服务器时,我遇到了这样的错误。任何帮助将不胜感激。

0 个答案:

没有答案