简体   繁体   中英

Code 302 when trying to post to Azure SQL database

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

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

After adding authentication ( https://docs.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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM