我最近将我的 .net 核心升级到 3.0,并将 Automapper 从 6.2 升级到 9.0。现在,在 mapfrom 函数中使用 mapper.map 时,automapper 会抛出以下编译时错误。
CreateMap<DomainEntity, destination>()
.ForMember(dest => dest.userId, opt => opt.MapFrom(src => Mapper.Map<.UserInfo, string>(src.UserDetails)))
.ForMember(dest => dest.alertKey, opt => opt.MapFrom(src => src.Key));
Run Code Online (Sandbox Code Playgroud)
非静态字段、方法或属性“Mapper.Map(xxx)”需要对象引用
Automapper 在 Mapper 类方法的新升级中删除了 static 关键字。
我有一个集成项目,我的 RestAPI 调用其他项目的 WCF 服务来执行一些 CRUD 操作。
我的项目建立在 .net core 2.2.102 上。我在 BETA 环境(在我的情况下为 PROD)中部署了我的项目并指向 WCF 服务的 PROD URL。然后我在尝试从我的应用程序运行请求时收到此错误:无法建立 SSL 连接,请参阅内部异常。
我试图在我的本地复制它。但是当我指向 WCF 服务的 BETA URLS 时,它在我的本地机器上工作正常。我检查了防火墙设置。我可以看到这些都很好。
这可能是什么根本原因?我无权访问 BETA,因此无法使用试错方法进行部署。我正在附加内部异常堆栈跟踪。
2019-02-04 15:03:50.752 -06:00 [Error] - HTTP Request "GET" in ms
System.ServiceModel.CommunicationException: The SSL connection could not be established, see inner exception. ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the …Run Code Online (Sandbox Code Playgroud)