简体   繁体   中英

Asp.Net Core 3.1 HttpConfigurationKey

We need to migrate a .net WebApi application to .net core 3.1 web api.

In the API extension method the following is showing an error.

HttpRequestMessage request = new HttpRequestMessage();
request.Properties.Add(System.Web.Http.Hosting.HttpPropertyKeys.HttpConfigurationKey, new System.Web.Http.HttpConfiguration());

as the old package used is not compatible. what is the alternative package or solution for this?

Installed the Microsoft.AspNet.WebApi.Core package( Install-Package Microsoft.AspNet.WebApi.Core ).In my code,it works fine.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM