本文介绍了移动服务配置:MS_NotificationHubConnectionString包含无效设置Key与QUOT; entitypath"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想调用自定义的API,它产生的服务日志以下错误,当试图创建一个新的Azure移动服务,但是。

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.

出错创建推送用户脚本:
  azure.notificationHubService无法创建。 HubName:
  servicenamehub的ConnectionString
  端点= SB://servicenamehub-ns.servicebus.windows.net/;
  SharedAccessKeyName = DefaultFullSharedAccessSignature;
  SharedAccessKey = {} ACCESSKEY; EntityPath = servicenamehub:从错误
  创建错误:无效的连接字符串设定键entitypath

错误似乎只产生使API调用的时候,不是做一个表上的电话时。

The error only seems to generate when making an API call, not when making a call on a table.

MS_NotificationHubConnectionString 是此连接字符串存储在什么地方,但它的服务中心一起自动生成的,而不是在服务配置编辑。

The MS_NotificationHubConnectionString is where this connection string is stored, however it was auto generated along with the service hub and isn't editable in the service configuration.

该EntityPath键不会出现在 MS_NotificationHubConnectionString 的我的任何旧的服务。移动业务有一个JavaScript后端。

The EntityPath key doesn't appear in the MS_NotificationHubConnectionString of any of my older services. The Mobile Service has a JavaScript back end.

我如何prevent这个错误或删除连接字符串EntityPath键?

How do I prevent this error or remove the EntityPath key from the connection string?

推荐答案

目前,这里是一个解决方法:我们登陆移动服务后端的捻控制台网站,修改 MS_NotificationHubConnectionString 在这将直接在源$ C ​​$ C创建通知中心服务的脚本。

Currently, here is a workaround: we login Kudu console site of the Mobile Service backend, modify MS_NotificationHubConnectionString in the script which will create notification hub service directly in source code.


  1. 在登录控制台捻网站,其URL应 https://开头< your_mobile_service_name> .scm.azure-mobile.net / DebugConsole

  2. 在页面中的文件系统列表中,输入的路径 D:\\家\\网站\\ wwwroot的\\ node_modules \\蔚蓝的移动服务\\运行\\​​推,编辑文件 pushadapter.js

  3. 添加以下code的作用 PushAdapter 在这个脚本周围22行的启动:

  1. login in Kudu console site, whose url should be https://<your_mobile_service_name>.scm.azure-mobile.net/DebugConsole
  2. In the file system list in the page, enter to the path D:\home\site\wwwroot\node_modules\azure-mobile-services\runtime\push, edit the file pushadapter.js
  3. Add following code to the start of the function PushAdapter in this script around line 22:

VAR字符串= options.MS_NotificationHubConnectionString;
 变种指数= string.indexOf('EntityPath');
    options.MS_NotificationHubConnectionString =指数大于0 string.slice(0,string.indexOf('EntityPath') - 1):字符串;

任何进一步的关注,请随时告诉我。

Any further concern, please feel free to let me know.

这篇关于移动服务配置:MS_NotificationHubConnectionString包含无效设置Key与QUOT; entitypath&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 13:31