【问题标题】:the remote server returned an error (404) not found. at system.net.httpwebrequest.getresponse()远程服务器返回错误 (404) 未找到。在 system.net.httpwebrequest.getresponse()
【发布时间】:2019-11-11 09:42:53
【问题描述】:

我遇到了 ssl 错误,所以我编写了一些代码来在 ssl 错误关闭后忽略 ssl 错误,现在它抛出新错误,例如远程服务器返回错误 (404) not found。在System.Net.HttpWebRequest.GetResponse()

ServicePointManager.ServerCertificateValidationCallback += 
      new RemoteCertificateValidationCallback(ValidateServerCertificate);
WebResponse tResponse = tRequest.GetResponse();  

请帮我关闭这个错误

【问题讨论】:

    标签: c# asp.net-mvc firebase asp.net-web-api


    【解决方案1】:

    我认为您使用了任何重定向方法,即使您已禁用它,也将您的请求从 http 重定向到 https,如果您从那里进行了任何重定向,请查看您的代码全局或配置文件。

    或者您可能正在使用 [RequireHttps] 来获得响应。

    【讨论】:

    • 不,我没有进行任何重定向,我正在使用一个 URL fcm.goggleapis.com/fcm/send 处理 Firebase 推送通知
    • 您是否检查了 HTTP 动词,您是否在 web.config 中正确使用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-07
    • 2010-12-20
    • 2017-09-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多