0

I am working on an Android app which uses Microsoft Azure Mobile App Service.

My app is based on the example code at: https://learn.microsoft.com/en-us/previous-versions/azure/app-service-mobile/app-service-mobile-android-get-started

After adding authentication (https://learn.microsoft.com/en-us/previous-versions/azure/app-service-mobile/app-service-mobile-android-get-started-users), I am getting a strange issue with post or update requests to my SQL database.

When I try to post to my MobileServiceTable object in Android, the process completes immediately with no error message but the table does not contain the object I've added.

Digging into the issue on Azure Portal, I found that post requests complete "successfully" with code 302 and do not ever access my SQL database. That is, the request is seen by the server and terminates with code 302 without ever accessing the database.

  • _The HyperText Transfer Protocol (HTTP) 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the Location header._ [Source MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302) – Max Aug 08 '20 at 14:06
  • Can you use a browser a connect to the Azure and see if you can connect to the database? It appears there is a connection issue between Azure the the SQL Server and not an issue with Android. – jdweng Aug 08 '20 at 14:33

1 Answers1

0

Refer the below post

How to fix Server Status Code: 302 Found by SQL Inject Me Firefox Addon

Seems like your connection attempt is not secure enough. You may want to Use azure AD to register and channel through that and see if that works for you. Also check sql paas firewall settings to make sure connection is allowed

A Modgil
  • 260
  • 1
  • 7