question

SukanyaCu-8118 avatar image
0 Votes"
SukanyaCu-8118 asked SaurabhSharma-msft commented

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

Hi, I follwed setps in tutorial :[https://docs.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
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @sukanyacu-8118,

Thanks for using Microsoft Q&A !!
I have tested the application and it works as expected.
124472-image.png

You may be passing a blank character (or some other character) in the Microsoft.ServiceBus.ConnectionString at the beginning something like below.
124396-image.png
I have tested with a blank character and it gives similar error.
124418-image.png

Thanks
Saurabh

0 Votes 0 ·
image.png (24.3 KiB)
image.png (22.9 KiB)
image.png (13.8 KiB)

Hi @sukanyacu-8118,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, respond back with the more details and we will try to help .

Thanks
Saurabh

0 Votes 0 ·

Hi @sukanyacu-8118,
Please let me know if you need any help on this issue.

Thanks
Saurabh

0 Votes 0 ·

0 Answers