WebApi中启用CORS跨域访问 1.安装 Nugget包Microsoft.AspNet.WebApi.Cors This package contains the components to enable Cross-Origin Resource Sharing (CORS) in ASP.NET Web API. 此包包含启用跨域资源共享的组件(CORS)在ASP.NET Web API. 目前版本是5.2.3 依赖项: Microsoft.AspNet.WebApi.Core (>=…
.NET Core 1.0.1 Module Component .NET Core MongoDB MongoDB.Driver There has a nuget package available v2.3.0. Json Newtonsoft.Json If you are working with Mvc, Newtonsoft.Json has been included by default. Logging Logging public class HomeController…