Unhandled Exception: System.Configuration.ConfigurationErrorsException: The Service Bus connection string contains invalid property. '

Sukanya Unnikrishnan 1 Reputation point
2021-08-18T09:32:22.953+00:00

Hi, I follwed setps in tutorial :[https://learn.microsoft.com/en-in/azure/stream-analytics/stream-analytics-real-time-fraud-detection?toc=/azure/event-hubs/TOC.json][1]

In the step: Start the event generator application
I have updated the telcodatagen.exe.config with EventHubName key and Microsoft.ServiceBus.ConnectionString key which I got from connection string.

When I run the command .\telcodatagen.exe 1000 0.2 2, I am geting below error. please help here.

Unhandled Exception: System.Configuration.ConfigurationErrorsException: The Service Bus connection string contains invalid property. '
Endpoint=sb://eventnamespace.servicebus.windows.net/;SharedAccessKeyName=MyPolicy;SharedAccessKey=sharedaccesskeyvalue' is not a valid property within the connection string.
at Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.CreateNameValueCollectionFromConnectionString(String connectionString)
at Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.Initialize(String connection, Nullable`1 transportType)
at telcodatagen.Program.GetServiceBusConnectionString() in C:\WORK\Enlist\GitHub\azure-stream-analytics\DataGenerators\TelcoGenerator\Program.cs:line 67
at telcodatagen.Program.Main(String[] args) in C:\WORK\Enlist\GitHub\azure-stream-analytics\DataGenerators\TelcoGenerator\Program.cs:line 38

Thanks,Sukanyaa

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
573 questions
{count} votes