这两行代码会告知API项目使用Swagger,并告知在何处查找规范文件swagger.json。 app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Todo API V1"); }); 启动项目浏览http://localhost:xxxx/swagger/index.html 看到效果如下: 在http://ASP.NETCore 中强制使用 ...
Mixed Content: The page at 'https://localhost:22380/' was loaded over HTTPS, but requested an insecure font 'http://db.onlinewebfonts.com/t/d866d1b97392f17f9abb424d7314c559.woff2'. This request has been blocked; the content must be served over HTTPS. All replies (3) Wednesday, ...
};varpath = AppDomain.CurrentDomain.BaseDirectory +"cert\\client.pfx";varcrt =newX509Certificate2(path,"123456789"); handler.ClientCertificates.Add(crt);varclient =newHttpClient(handler);varurl ="https://localhost:5001/WeatherForecast";varresponse =client.GetAsync(url).Result; Console.WriteLine(res...
Hi, I'm using .net core 2.1. Yes, this is the command that I used and I'm currently running only on localhost. :)Thursday, March 28, 2019 6:53 AMHi Idov,The problem may lie in your certificate and it works well when I test on https://localhost:5000....