VitoldUSA
VitoldUSA

Reputation: 57

Event Hub Error: Exception: Put token failed. status-code: 401 Unauthorized TrackingId

I am working on an MVC Web Application which sends data as a producer to an Event Hub. I have successfully set up event hub name space and event hub and was able to successfully send data while running a project in my local machine via local-host.

However when i deployed an application to Azure's Cloud i am getting the following error exception while trying to send data:

Put token failed. status-code: 401, status-description: Unauthorized TrackingId:XXXX-XXXXX

Both Event Hub and Web Application is under the same subscription. SAS Policy Connection string is from the root of a name-space.

Works fine locally, but receiving error on the Azure's Cloud when accessing that page.

Thanks in advance.

Upvotes: 1

Views: 2426

Answers (1)

Serkant Karaca
Serkant Karaca

Reputation: 2034

Couple of things you may need to check:

  • Make sure VNET and IP rules are properly configured.
  • Make sure both local and cloud deployments use the same connection string.

Upvotes: 1

Related Questions