简体   繁体   English

错误 - 403 禁止 - Microsoft-Azure-Application-Gateway/v2

[英]Error - 403 Forbidden - Microsoft-Azure-Application-Gateway/v2

When I try to send the below request to .net core web api, I am getting the error as "403 Forbidden - Microsoft-Azure-Application-Gateway/v2".当我尝试将以下请求发送到 .net 核心 web api 时,我收到的错误为“403 Forbidden - Microsoft-Azure-Application-Gate”。 I have used the HTML encoding for encodeEmailBody property.我对encodeEmailBody属性使用了 HTML 编码。

Web Api Code:- Web Api 代码:-

[HttpPut("UpdateEmail")]
[Produces("application/json")]
public async Task<IActionResult> UpdateEmailAsync([FromBody] EmailRequest emailRequest)
{
    var result = await _businessService.UpdateEmailAsync(emailRequest);
    return Ok(result);
}

Request Class请求 Class

public class EmailRequest
{
    public Guid EmailTemplateTypeId { get; set; }
    public string EncodeEmailSubject { get; set; }
    public string EncodeEmailBody { get; set; }
    public Guid CountryId { get; set; }
}

Request要求

{
  "emailTemplateTypeId": "4C4B989B-769B-4999-8109-5A51199C09A8",
  "encodeEmailSubject": "test",
  "encodeEmailBody": "&lt;p&gt;The retention file MXMT generation for the &quot;&lt;&lt;EngagementName&gt;&gt;&quot; did not complete successfully.&lt;p&gt;&lt;p&gt;Please contact your local country helpdesk  support function.&lt;p&gt;&lt;hr&gt;&lt;i&gt;This is an automatically generated email. Please do not respond to this email. The mailbox is not b",
  "countryId": "47E37625-ECC5-4F68-ACA6-61432787390D"
}

Error:-错误:-

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>Microsoft-Azure-Application-Gateway/v2</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

NOTE: When I call this API locally, it is working fine but not working on service fabric node .注意:当我在本地调用此 API 时,它工作正常,但不能在service fabric node上工作。

Any help will be apricated.任何帮助将不胜感激。

The request is being stopped by the Azure Application Gateway that is in front of your service.该请求被您的服务前面的 Azure 应用程序网关停止。

https://docs.microsoft.com/en-us/azure/application-gateway/overview https://docs.microsoft.com/en-us/azure/application-gateway/overview

Azure Application Gateway includes a Firewall (WAF) Azure 应用程序网关包括防火墙 (WAF)

The problem is probably that the WAF is flagging your request as malicious.问题可能是 WAF 将您的请求标记为恶意请求。 You need to first check the logs on the firewall to see why it is being blocked, then either disable the rule that is blocking the request, or create an exception rule to allow that specific url through.您需要首先检查防火墙上的日志以了解其被阻止的原因,然后禁用阻止请求的规则,或创建例外规则以允许特定的 url 通过。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.NET MVC 错误 403 禁止 Microsoft-Azure-Application-Gateway/v2 - ASP.NET MVC error 403 forbidden Microsoft-Azure-Application-Gateway/v2 尝试将特定图像上传到 Azure 存储帐户时出现 403 Forbidden - Microsoft-Azure-Application-Gateway/v2 - Getting 403 Forbidden - Microsoft-Azure-Application-Gateway/v2 when trying to upload particular image to the Azure storage account Azure v2 GetResponse身份验证失败。 错误403:禁止 - Azure v2 GetResponse fails to authenticate. Error 403: Forbidden Microsoft Graph API:Httpclient 403 Forbidden 错误 - Microsoft Graph API: Httpclient 403 Forbidden error 使用 Microsoft Graph v1.0 SDK 创建 OnlineMeeting 时出现 Forbidden 403 错误 - Getting Forbidden 403 error while creating OnlineMeeting using Microsoft Graph v1.0 SDK Azure 存储帐户 - 禁止错误 403 - Azure Storage Account - error 403 forbidden AWS API Gateway 403:禁止 - AWS API Gateway 403:Forbidden Azure存储 - 403禁止 - Azure Storage - 403 Forbidden Microsoft.Azure.WebJobs.Host:无法绑定参数“ myContext”以键入DataContext。 Azure Function v2中的错误 - Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'myContext' to type DataContext. error in Azure Function v2 使用我们的应用程序打开SVG时DTD上的错误403(禁止) - Error 403 (Forbidden) on the DTD while opening a SVG with our application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM