部署Asp.net web api项目后出现502错误 [英] 502 error after deploying an Asp.net web api project

查看:103
本文介绍了部署Asp.net web api项目后出现502错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好 

我将我的网络api部署到azure,我试图从我的客户端应用程序中使用它。

I deployed my web api to azure and im trying to consume it from my client app.

第一件事我使用浏览器调用我的控制器上的一个get方法,我得到一个XML说: 

first thing i did i used the browser to call one of the get methods on my controller and i got an XML says : 

"发生错误。"

所以我用Fiddler获取有关响应的更多信息,我得到的是: 

So i used Fiddler to get more info about the response and what i got there is : 

502 

502 

与'rexsit-web-api.azurewebsites.net'的连接失败

The connection to 'rexsit-web-api.azurewebsites.net' failed

"无法与server.fiddler.network.https& gt;协商HTTPS连接对rexsit-web-api.azurewebsites.net(#5191)的HTTPS握手失败"

"Failed to negotiate HTTPS connection with server.fiddler.network.https> HTTPS handshake to rexsit-web-api.azurewebsites.net (for #5191) failed"

我不知道这是否是Fiddler的问题或者我的应用程序 

I don't know if it's Fiddler's problem or something with my app 

我该如何解决这个问题?

how do i solve this ?

推荐答案

嗨Rexsit, 

Hi Rexsit, 

看起来像这样是Fiddler的一个已知问题。如果您的客户端和服务器(您的WebApi)在TLS中不兼容,则会出现该错误。请按照
此博客中的步骤修复错误。您可能还需要考虑

为您的应用启用CORS
(跨源资源共享)。希望有所帮助。

It looks like this is a known issue with Fiddler. You get that error if your client and server (your WebApi) are not compatible in TLS. Please follow the steps in this blog to fix the error. You may also want to consider enabling CORS (Cross-Origin Resource Sharing) for your app. Hope that helps.

 

____________________________________________________________________________________________

____________________________________________________________________________________________

注意:此回复包含对第三方的引用万维网站点。 Microsoft提供此信息是为了方便您。 Microsoft不控制这些网站,也未测试
在这些网站上发现的任何软件或信息;因此,Microsoft不能就其中发现的任何软件或信息的质量,安全性或适用性做出任何陈述。此外,建议不要关闭防火墙,在测试后立即启用防火墙

Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Also, it is not recommended to turnoff firewall, enable the firewall immediately after the test.


这篇关于部署Asp.net web api项目后出现502错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆