【发布时间】:2018-12-03 17:46:13
【问题描述】:
大家好,
我刚刚在 ASP.NET MVC Core 中实现了一个 REST API。 GET 工作得很好,但是当我尝试测试 POST、PUT 和 DELETE 时,我得到了同样的错误:
{System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.}
谁能帮助我提示如何避免此错误?
【问题讨论】:
-
你在函数顶部添加了[HttpPost]吗?
-
是的,当然。
-
您是否正在使用 VS2017 / IIS Express 进行测试?还是部署在服务器上?
-
是的,VS2017 / IIS Express,即使在另一台机器上的 IIS 上部署也会出现同样的错误。
-
您是否测试了 http 端点?如果这可行,那么您的本地主机证书有问题
标签: asp.net-core