azure-mobile-services

Logout/invalidate a JWT

依然范特西╮ 提交于 2019-12-08 15:33:24
问题 I'm using custom authentication in Azure Mobile Services by generating a JWT (JSON Web Token) in a custom login API. Once a user has a JWT, it's valid until its encoded expiry time is reached. Beyond explicitly checking the JWT token against a sessions table on every authenticated request, is there a way to invalidate the JWT token before its expiry time (as would happen when a user logs out) such that any subsequent request made with that token as a value in the X-ZUMO-AUTH header would

Windows Phone 8 Azure Mobiles Services - Keep me signed in (Microsoft Account)

久未见 提交于 2019-12-08 14:04:00
问题 I am writing a Windows Phone 8 app which will use the Microsoft Account to authenticate a user (Via Azure Mobile Services) I have followed the instructions here: http://www.windowsazure.com/en-us/develop/mobile/how-to-guides/register-for-microsoft-authentication/ Everything works as expected I get a user ID token back from the service and I use this to identify the user's assets in my system. Problem: Every time I run the App, It wants me to log in. Ticking the Keep Me Signed In check box

AzureMobileService: Insert data in to table gives exception

て烟熏妆下的殇ゞ 提交于 2019-12-08 13:31:08
问题 I am new to implement Azure Mobile Service. I have refer the demo of ToDoItem given by Azure. In same manner i have make class User for my own app. Then I am inserting the data in to the MobileServiceTable but it gives me error like below: {"message":"The operation failed with the following error: 'A null store-generated value was returned for a non-nullable member 'CreatedAt' of type 'CrazyLabApp.Models.User'.'."} I have not created any field like this as it is not created in ToDoItem demo

Update a specific row in Windows Azure Mobile Services SQL Database

两盒软妹~` 提交于 2019-12-08 12:52:58
问题 I am trying to update a specific row in Table of windows azure mobile services. item is a reference to a row in the ToDoItem table, which has had some changes made to it. private void updateItem(final ToDoItem item) { if (mClient == null) { return; } new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { try { mToDoTable.update(item).get(); runOnUiThread(new Runnable() { public void run() { if (item.isComplete()) { mAdapter.remove(item); }

Azure Offline Sync - How to use “Contains”

佐手、 提交于 2019-12-08 11:29:45
问题 I have an Azure Table and I want to sync it offline on my mobile device, Everything works fine if I pass single where clause such as following var query = todoTable.CreateQuery().Where(c => c.Id == "some id here"); await todoTable.PullAsync(null, query); But I have a List which contains multiple IDs such as List<string> IDS = new List<string>(); IDS.Add("Some ID 1"); IDS.Add("Some ID 2"); and I am trying to pass that in my query as following to only get items with specific Ids var query =

SBNotificationHub crash on return from registerTemplateWithDeviceToken in Testflight Beta build distribution only

纵然是瞬间 提交于 2019-12-08 11:17:07
问题 If I disable notifications for the app, I don't sync and the app runs fine. If they're enabled, and the code notices and tries to sync - it falls apart. App has been working 100% fine for weeks with no code changes. Wondering if switching between schemes of the same build on the same test device is hosing things. Works fine run with the same, non-debug/production, scheme from Xcode to the device. But installed via Testflight app of an official archived build it crashes. Very weird. Any

Azure Notifications to WP and iOS

自作多情 提交于 2019-12-08 10:32:18
问题 My app uses an Azure Notification Hub to send messages to both Windows Phone and iOS devices. The problem is that they work if one is called, but it doesn't work if both are called. For example, If I send a message to an iOS device from my iOS emulator, the following code works fine and the notification appears. var toast = PrepareMpnsToastPayload("myapp", notificationText); var appleToast = PrepareAppleToastPayload("myapp", notificationText); //await NotificationHelper.Instance.Hub

Azure Mobile App - Getting 405 (Method Not Allowed) when trying POST

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 09:45:20
问题 I'm trying to migrate my Azure Mobile Service .NET backend to an Azure Mobile App. I was using some custom Web Api controllers, and after migration I'm getting a 405 (Method Not Allowed) / The requested resource does not support http method 'POST'. error when trying to POST to a controller method that worked before. I spent hours trying diffent CORS settings but I had no success so far. This is how I currently configure Web Api: HttpConfiguration config = new HttpConfiguration(); new

Synchronous request in Windows Azure?

不问归期 提交于 2019-12-08 09:39:18
问题 So in my server code, variable invites is undefined outside of the success function. function getInvites(id){ var InvitesTable = tables.getTable("Invites").where({"PlanID": id}).select("UserID","Attending"); var invites; InvitesTable.read({ success: function(resultss) { invites = resultss; console.log(invites); //works here }}); console.log(invites); //undefined here } From similar questions, I realize its because of it being asynchronous. So the success function call is run after the console

Running Azure Mobile Server project locally

独自空忆成欢 提交于 2019-12-08 06:43:06
问题 I'm running an Azure Mobile Server project locally with a local SQL Database. I started from the Quickstart project, but as soon as I change the Entity to something more complex, I get this error with my migration: "Cannot create more than one clustered index on table..." Even with the correct schema I get this other error: "Automatic migrations that affect the location of the migrations history system table (such as default schema changes) are not supported. Please use code-based migrations