简体   繁体   中英

connectionstring 500 error Azure IoT

Have deployed a test device that sends to Azure IOT then alerts into Dynamics 365.

I am trying to view data from a web app using https://github.com/Azure-Samples/web-apps-node-iot-hub-data-visualization

Once completed I open web page and get a 500 error with below in log:

Application has thrown an uncaught exception and is terminated: ArgumentError: Connection string doesn't have EntityPath, or missing argument path at Function.EventHubClient.fromConnectionString (D:\\home\\site\\wwwroot\\node_modules\\azure-event-hubs\\lib\\client.js:92:11)

I used the connectionstring below from the IoTHub -> Endpoint -> Events -> Event Hub Compatible Endpoint :

set Azure.IoT.IoTHub.ConnectionString=sb://iothub-ns-****************r-451891-d07caf9987.servicebus.windows.net/;SharedAccessKeyName=iothubowner;SharedAccessKey=zNy3a*******************CZyjCoTpXdem0=

I have also tried to run locally and added EntityPath to connection string with no success.

I did notice in Azure that it has a warning for my IoTHub: Some IoT Hub features are disabled due to the location of your resource. The following are the impacted features: Events

Could this be an issue?

我只是再次测试,并从以下位置添加了“主键”连接字符串:共享访问策略-> iothubowner,它起作用了。

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