3

新しいAzureモバイルサービスを作成しようとしていますが、カスタムAPIを呼び出すときに、サービスのログに次のエラーが生成されます。モバイルサービスの設定:MS_NotificationHubConnectionStringに無効な設定キーが含まれています。 "entitypath"

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 connection string setting key "entitypath".

API呼び出しを行うときにエラーが発生したように見えます。テーブルを呼び出すときにはエラーが発生していないようです。

MS_NotificationHubConnectionStringは、この接続文字列が格納される場所ですが、サービスハブと共に自動生成され、サービス設定では編集できません。

EntityPathキーは、以前のサービスのMS_NotificationHubConnectionStringには表示されません。モバイルサービスにはJavaScriptのバックエンドがあります。

このエラーを回避する方法、または接続文字列からEntityPathキーを削除する方法を教えてください。

+0

カスタムAPIのコードを共有できますか? –

+0

また、このAzure Mobile ServiceまたはAzure Mobile Appsもありますか? (古典ポータルまたは新ポータル)? –

+0

GETとPOSTの両方で、デフォルトのコードまたはカスタムコードを使用すると起こります。クラシックなモバイルサービスです。 – DotEfekts

答えて

1

現在、回避策があります:モバイルサービスバックエンドのKuduコンソールサイトにログインし、MS_NotificationHubConnectionStringを修正して、ソースコードで通知ハブサービスを直接作成します。そのURLパスD:\home\site\wwwroot\node_modules\azure-mobile-services\runtime\pushに入力して、ページ内のファイルシステムのリストでhttps://<your_mobile_service_name>.scm.azure-mobile.net/DebugConsole

  • あるべきクーズーコンソールサイトで

    1. ログイン、ファイルを編集pushadapter.js
    2. の先頭に次のコードを追加します。ライン22の周りに、このスクリプトで機能PushAdapter

      var string = options.MS_NotificationHubConnectionString; var index = string.indexOf('EntityPath'); options.MS_NotificationHubConnectionString = index>0?string.slice(0,string.indexOf('EntityPath')-1):string;

    さらに詳しいことがありましたら、お気軽にお知らせください。

  • 関連する問題