azure-mobile-services

How to use substringof in azure-mobile-apps-js-client

↘锁芯ラ 提交于 2019-12-11 04:59:02
问题 I want to make use of odata substringof method using azure-mobile-apps-js-client. Currently I use indexof method but want to switch to substringof. I have this code function queryFunction(term){ return this.FullName.indexOf(term) != -1 } table.where(queryFunction, term) Which translates to $filter=indexof(FullName, term) ne -1 I need URL like this: filter=substringof(term, FullName) eq true How do I do that with javascript ? 回答1: azure-query-js supports a limited set of Javascript functions

Cordova AAD server flow authentication hangs on Android and iOS

主宰稳场 提交于 2019-12-11 04:35:34
问题 I've been trying to solve this issue for over a week now with no progress whatsoever. I’m having trouble authenticating using Cordova Azure Mobile App plugin and .NET/C# back-end. I'm following this tutorial on creating a Cordova app for Android/iOS. I added Azure Active Directory as my provider for authentication based on this tutorial. I downloaded the quickstart projects from the Azure Portal for Cordova and .NET/C# back-end. I deployed the Azure mobile app back-end and updated the

Passing Query Parameters from HTML/JS App to Azure Server Script

一个人想着一个人 提交于 2019-12-11 04:04:55
问题 I am currently working on an HTML/JS App using Windows Azure Mobile Service. I have two tables, one storing information about an attraction [attractionTable(attractionId, address,...)] and one keeping track of which user likes which attraction [favoriteAttractionTable(attractionId, userId, fav(bool))]. If the client wants to have a list of his favorite attractions there should only be one request to the server. On the server side I edited the read script of the favoriteAttractionTable to this

Xamarin MonoAndroid Azure mobile service InsertAsync

允我心安 提交于 2019-12-11 03:30:08
问题 I'm using Xamarin for Android and have added the azure mobile services componenet. I'm trying to create the todo list application like (https://github.com/xamarin/azure-mobile-services) I connect to the mobile service like this: public static string mobileServiceUrl = "http://MyMoblieService.azure-mobile.net/.azure-mobile.net/"; public static string mobileServiceAppKey = "MyAppKey"; private static readonly MobileServiceClient MobileService = new MobileServiceClient(mobileServiceUrl,

How to refactor this C# code

∥☆過路亽.° 提交于 2019-12-11 01:43:01
问题 I have these functions public async Task<List<Machine>> GetMachines() { await Initialize(); await SyncMachines(); return await machineTable.ToListAsync(); } public async Task InsertMachines(List<Machine> machines) { await Initialize(); await Task.WhenAll(machines.Select(m => machineTable.InsertAsync(m))); await SyncMachines(); } I am writing a parent class to put these functions in, such that the functions getMachines() and InsertMachines() become getObject and InsertObject where the List

Azure Mobile Services, Custom API, update ouput followed by select returns empty results

倖福魔咒の 提交于 2019-12-11 01:35:38
问题 The following results.length is always 0 while the row is defintely updated. exports.get=function(request,response){ var mssql=request.service.mssql; var sql="declare @tableId table(id nvarchar(255)); update mytable set myfield=1 output inserted.id into @tableId where id=(select top 1 id from mytable where myfield is null order by date); select id from @tableId;"; mssql.query(sql, { success:function(results){ if(results.lentgh==1) response.send(statusCodes.OK, results[0]); else response.send

Error 500 on Post new entity with TableController and AzureMobileApps

回眸只為那壹抹淺笑 提交于 2019-12-11 00:40:08
问题 I'm experiencing a problem using TableController on AzureMobileApps. I've created a new Azure Mobile App TableController in visual studio using scaffolding. In post I modified the resulting code adding an attach on the dbContext to avoid creating referenced item during insert on the child table. That's the resulting code: public async Task<IHttpActionResult> PostLocation(Location item) { _context.Accounts.Attach(item.LocationAccount); _context.Categories.Attach(item.PrimaryCategory); Location

Azure mobile services - multiple azure active directories

半世苍凉 提交于 2019-12-10 22:39:23
问题 We want to develop a mobile application which will be used by users in multiple organizations. Each of these organizations will have an Azure Active Directory tenant owned by them. We want to use Azure Mobile Services for authenticating users. Once the user is authenticated and the mobile app has the JWT token, it will be subsequently sent to our API gateway to access various services. Is is possible to use Azure mobile service Identity component in such a way that the app can authenticate

Mobile Service Configuration: MS_NotificationHubConnectionString Contains Invalid Setting Key “entitypath”

北城余情 提交于 2019-12-10 19:35:21
问题 I'm trying to create a new Azure Mobile Service, however when trying to call a Custom API it generates the following error in the logs of the service. An error occurred creating push for user scripts: azure.notificationHubService could not be created. HubName: "servicenamehub" ConnectionString "Endpoint=sb://servicenamehub-ns.servicebus.windows.net/; SharedAccessKeyName=DefaultFullSharedAccessSignature; SharedAccessKey={accesskey};EntityPath=servicenamehub": Error from create-Error: Invalid

Can a mobile service server script (schedule) access other Sql Azure databases?

拜拜、爱过 提交于 2019-12-10 19:06:54
问题 I'm looking to create a scheduled job using a Azure mobile service. Since the service will end up calling another cloud service (website), I was wondering if the mobile script could access a database the cloud service already does. I understand you can specify a database to use for the mobile script (I selected free for logging) but can't seem to tell if you can access other databases through the API. var todoItemsTable = tables.getTable('TodoItems'); Hypothetically... var todoItemsTable =