I have faced a connection error to azure from my developing xamarion forms app after I tried to add an email function of google SMTP to the app. I used my own google account's credentials to send email and allow Less Secure Apps in google account setting. However, after I successfully sent the first email, Google blocked the app and surprisingly azure also could not get the uploaded data from the app. I started the debug mode in visual studio and got the following messages:
{StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Date: Wed, 17 Nov 2021 12:30:01 GMT
Server: Microsoft-IIS/10.0
Set-Cookie: ARRAffinity=ee7a1ed55adb83304d202ee1fe723b7adba7ac178c79e64e7f03ca620a2fd2b7;Path=/;HttpOnly;Secure;Domain=datingbirdapi.azurewebsites.net
Set-Cookie: ARRAffinitySameSite=ee7a1ed55adb83304d202ee1fe723b7adba7ac178c79e64e7f03ca620a2fd2b7;Path=/;HttpOnly;SameSite=None;Secure;Domain=datingbirdapi.azurewebsites.net
X-Android-Received-Millis: 1637152201237
X-Android-Response-Source: NETWORK 400
X-Android-Selected-Protocol: http/1.1
X-Android-Sent-Millis: 1637152201171
X-Powered-By: ASP.NET
Content-Length: 321
Content-Type: application/problem+json; charset=utf-8
}}
I finally made the email work by setting app password in google. But the azure cloud still cannot get data from my app.